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
36 37 38 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 36 def created_at date_view object.created_at end |
#event_title ⇒ Object
24 25 26 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 24 def event_title object.event.title end |
#field_type ⇒ Object
28 29 30 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 28 def field_type enumerize_view object.field_type end |
#state ⇒ Object
32 33 34 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 32 def state state_machine_view object, :state end |
#title ⇒ Object
20 21 22 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 20 def title "#{object.title} #{object.event.title}" end |
#updated_at ⇒ Object
40 41 42 |
# File 'app/decorators/tramway/event/participant_form_field_decorator.rb', line 40 def updated_at date_view object.updated_at end |