Class: Tramway::Event::ActionDecorator
- Inherits:
-
Core::ApplicationDecorator
- Object
- Core::ApplicationDecorator
- Tramway::Event::ActionDecorator
- Defined in:
- app/decorators/tramway/event/action_decorator.rb
Instance Method Summary collapse
Instance Method Details
#action_state_button_color(event) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'app/decorators/tramway/event/action_decorator.rb', line 17 def (event) case event when :do :success when :decline :danger when :return :warning end end |
#name ⇒ Object
9 10 11 |
# File 'app/decorators/tramway/event/action_decorator.rb', line 9 def name "#{object.title} - #{date_view(object.deadline)} - #{state_machine_view(object, :action_state)}" end |
#title ⇒ Object
13 14 15 |
# File 'app/decorators/tramway/event/action_decorator.rb', line 13 def title object.title end |