Class: WorkshopPresenter
- Inherits:
-
EventCommonPresenter
- Object
- BasePresenter
- EventCommonPresenter
- WorkshopPresenter
- 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
-
#label_published ⇒ Object
——————————————————————————.
-
#start_end_date ⇒ Object
——————————————————————————.
Instance Method Details
#label_published ⇒ Object
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_date ⇒ Object
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 |