Class: Tramway::Event::ParticipantFormFieldDecorator
- Inherits:
-
Core::ApplicationDecorator
- Object
- Core::ApplicationDecorator
- Tramway::Event::ParticipantFormFieldDecorator
- Defined in:
- app/decorators/tramway/event/participant_form_field_decorator.rb
Class Method Summary collapse
Instance Method Summary collapse
- #created_at ⇒ Object
- #event_title ⇒ Object
- #field_type ⇒ Object
- #state ⇒ Object
- #title ⇒ Object
- #updated_at ⇒ Object
Class Method Details
.collections ⇒ Object
5 6 7 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 5 def collections [:all] end |
.list_attributes ⇒ Object
9 10 11 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 9 def list_attributes [:event_title] end |
.show_attributes ⇒ Object
13 14 15 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 13 def show_attributes %i[id title description field_type event_title state created_at updated_at options position] end |
Instance Method Details
#created_at ⇒ Object
38 39 40 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 38 def created_at date_view object.created_at end |
#event_title ⇒ Object
26 27 28 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 26 def event_title object.event.title end |
#field_type ⇒ Object
30 31 32 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 30 def field_type enumerize_view object.field_type end |
#state ⇒ Object
34 35 36 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 34 def state state_machine_view object, :state end |
#title ⇒ Object
22 23 24 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 22 def title "#{object.title} #{object.event.title}" end |
#updated_at ⇒ Object
42 43 44 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 42 def updated_at date_view object.updated_at end |