Class: Tramway::SportSchool::KindSportDecorator
- Inherits:
-
Core::ApplicationDecorator
- Object
- Core::ApplicationDecorator
- Tramway::SportSchool::KindSportDecorator
- Defined in:
- app/decorators/tramway/sport_school/kind_sport_decorator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.collections ⇒ Object
5 6 7 |
# File 'app/decorators/tramway/sport_school/kind_sport_decorator.rb', line 5 def collections %i[all published hidden] end |
.list_attributes ⇒ Object
9 10 11 |
# File 'app/decorators/tramway/sport_school/kind_sport_decorator.rb', line 9 def list_attributes [:view_state] end |
Instance Method Details
#view_state ⇒ Object
14 15 16 |
# File 'app/decorators/tramway/sport_school/kind_sport_decorator.rb', line 14 def view_state object.human_view_state_name end |
#view_state_button_color(event) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'app/decorators/tramway/sport_school/kind_sport_decorator.rb', line 18 def (event) case event when :publish :primary when :hide :secondary end end |