Class: Integral::BaseDecorator

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

Overview

Base decorator for Integral 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/base_decorator.rb', line 7

def activity_url(activity_id)
  Integral::Engine.routes.url_helpers.send("activity_backend_#{object.class.model_name.singular_route_key}_url", object.id, activity_id)
end

#backend_urlString

Returns URL to backend Image page.

Returns:

  • (String)

    URL to backend Image page



12
13
14
# File 'app/decorators/integral/base_decorator.rb', line 12

def backend_url
  Integral::Engine.routes.url_helpers.send("backend_#{object.class.model_name.singular_route_key}_url", object.id)
end