Class: Integral::PageDecorator

Inherits:
Draper::Decorator
  • Object
show all
Defined in:
app/decorators/integral/page_decorator.rb

Overview

Page view-level logic

Instance Method Summary collapse

Instance Method Details

#activity_url(activity_id) ⇒ String

Returns URL to backend activity.

Returns:

  • (String)

    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_urlString

Returns URL to backend list page.

Returns:

  • (String)

    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

#bodyString

Returns formatted body.

Returns:

  • (String)

    formatted body



22
23
24
# File 'app/decorators/integral/page_decorator.rb', line 22

def body
  object.body.html_safe
end

#titleString

Returns formatted title.

Returns:

  • (String)

    formatted title



17
18
19
# File 'app/decorators/integral/page_decorator.rb', line 17

def title
  object.title
end