Module: RailsConnector::DefaultCmsRoutingHelper

Included in:
CmsRoutingHelper
Defined in:
app/helpers/rails_connector/default_cms_routing_helper.rb

Instance Method Summary collapse

Instance Method Details

#cms_path(target, options = {}) ⇒ String

Returns the path for target using the CmsController routes. target can be an Obj or a Link or a LinkList. If target is a Linklist, it must be non-empty. The first Link from the LinkList will be used. options are optional and include url settings such as path parameters or protocol.

Returns:

  • (String)


11
12
13
# File 'app/helpers/rails_connector/default_cms_routing_helper.rb', line 11

def cms_path(target, options = {})
  cms_path_or_url(target, "path", options)
end

#cms_url(target, options = {}) ⇒ String

Returns the absolute URL for target using the CmsController routes. target can be an Obj or a Link or a LinkList. If target is a Linklist, it must be non-empty. The first Link from the LinkList will be used. options are optional and include url settings such as path parameters or protocol.

Returns:

  • (String)


21
22
23
# File 'app/helpers/rails_connector/default_cms_routing_helper.rb', line 21

def cms_url(target, options = {})
  cms_path_or_url(target, "url", options)
end