Class: Tramway::SportSchool::DocumentDecorator
- Inherits:
-
Core::ApplicationDecorator
- Object
- Core::ApplicationDecorator
- Tramway::SportSchool::DocumentDecorator
- Defined in:
- app/decorators/tramway/sport_school/document_decorator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.collections ⇒ Object
5 6 7 |
# File 'app/decorators/tramway/sport_school/document_decorator.rb', line 5 def collections [:all] end |
.list_attributes ⇒ Object
9 10 11 |
# File 'app/decorators/tramway/sport_school/document_decorator.rb', line 9 def list_attributes [:view_state] end |
.show_attributes ⇒ Object
13 14 15 |
# File 'app/decorators/tramway/sport_school/document_decorator.rb', line 13 def show_attributes [:title] end |
Instance Method Details
#view_state ⇒ Object
22 23 24 |
# File 'app/decorators/tramway/sport_school/document_decorator.rb', line 22 def view_state object.human_view_state_name end |
#view_state_button_color(event) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'app/decorators/tramway/sport_school/document_decorator.rb', line 26 def (event) case event when :publish :primary when :hide :secondary end end |