Class: Integral::PageDecorator
- Inherits:
-
Draper::Decorator
- Object
- Draper::Decorator
- Integral::PageDecorator
- Defined in:
- app/decorators/integral/page_decorator.rb
Overview
Page view-level logic
Instance Method Summary collapse
-
#activity_url(activity_id) ⇒ String
URL to backend activity.
-
#backend_url ⇒ String
URL to backend list page.
-
#body ⇒ String
Formatted body.
-
#title ⇒ String
Formatted title.
Instance Method Details
#activity_url(activity_id) ⇒ String
Returns URL to backend activity.
7 8 9 |
# File 'app/decorators/integral/page_decorator.rb', line 7 def activity_url(activity_id) Integral::Engine.routes.url_helpers.activity_backend_page_url(object.id, activity_id) end |
#backend_url ⇒ String
Returns URL to backend list page.
12 13 14 |
# File 'app/decorators/integral/page_decorator.rb', line 12 def backend_url Integral::Engine.routes.url_helpers.edit_backend_page_url(self) end |
#body ⇒ String
Returns formatted body.
22 23 24 |
# File 'app/decorators/integral/page_decorator.rb', line 22 def body object.body.html_safe end |
#title ⇒ String
Returns formatted title.
17 18 19 |
# File 'app/decorators/integral/page_decorator.rb', line 17 def title object.title end |