Module: Decidim::Conferences::ConferenceHelper

Defined in:
app/helpers/decidim/conferences/conference_helper.rb

Instance Method Summary collapse

Instance Method Details

#render_date(conference) ⇒ Object

Renders the dates of a conference



9
10
11
12
13
# File 'app/helpers/decidim/conferences/conference_helper.rb', line 9

def render_date(conference)
  return l(conference.start_date, format: :decidim_with_month_name_short) if conference.start_date == conference.end_date

  "#{l(conference.start_date, format: :decidim_with_month_name_short)} - #{l(conference.end_date, format: :decidim_with_month_name_short)}"
end