Class: WorkshopPresenter

Inherits:
EventCommonPresenter show all
Defined in:
app/presenters/workshop_presenter.rb

Overview

Define presentation-specific methods here. Helpers are accessed through ‘helpers` (aka `h`).

This class is used to contain some common presenter functions


Instance Method Summary collapse

Instance Method Details

#label_publishedObject




13
14
15
# File 'app/presenters/workshop_presenter.rb', line 13

def label_published
  !model.registration_closed? ? h.colored_label(start_end_date, :success) : h.colored_label(start_end_date)
end

#start_end_dateObject




18
19
20
# File 'app/presenters/workshop_presenter.rb', line 18

def start_end_date
  format_date_range(model.starting_on, model.ending_on)
end