Class: Tramway::Event::EventAsPageWithButtonDecorator
- Inherits:
-
EventDecorator
- Object
- EventDecorator
- Tramway::Event::EventAsPageWithButtonDecorator
- Defined in:
- app/decorators/tramway/event/event_as_page_with_button_decorator.rb
Instance Method Summary collapse
Instance Method Details
#anchor ⇒ Object
4 5 6 |
# File 'app/decorators/tramway/event/event_as_page_with_button_decorator.rb', line 4 def anchor "event_#{object.id}" end |
#button ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/decorators/tramway/event/event_as_page_with_button_decorator.rb', line 24 def content_tag :div do content_tag( :a, href: ::Tramway::Event::Engine.routes.url_helpers.event_path(object.id), class: 'btn btn-primary' ) do 'Регистрация' end end end |
#description ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/decorators/tramway/event/event_as_page_with_button_decorator.rb', line 12 def description if object.short_description.present? content_tag :div do concat duration concat content_tag :br concat object.short_description end else duration end end |