Module: Cms::PathHelper

Included in:
ApplicationController
Defined in:
app/helpers/cms/path_helper.rb

Instance Method Summary collapse

Instance Method Details

#cms_connectable_path(connectable, options = {}) ⇒ Object



19
20
21
22
23
24
25
# File 'app/helpers/cms/path_helper.rb', line 19

def cms_connectable_path(connectable, options={})
  if Portlet === connectable
    cms_portlet_path(connectable)
  else
    [:cms, connectable]
  end
end

#cms_index_path_for(resource, options = {}) ⇒ Object



3
4
5
# File 'app/helpers/cms/path_helper.rb', line 3

def cms_index_path_for(resource, options={})
  send("cms_#{resource_collection_name(resource).pluralize}_path", options)
end

#cms_index_url_for(resource, options = {}) ⇒ Object



7
8
9
# File 'app/helpers/cms/path_helper.rb', line 7

def cms_index_url_for(resource, options={})
  send("cms_#{resource_collection_name(resource).pluralize}_url", options)
end

#cms_new_path_for(resource, options = {}) ⇒ Object



11
12
13
# File 'app/helpers/cms/path_helper.rb', line 11

def cms_new_path_for(resource, options={})
  send("new_cms_#{resource_collection_name(resource)}_path", options)
end

#cms_new_url_for(resource, options = {}) ⇒ Object



15
16
17
# File 'app/helpers/cms/path_helper.rb', line 15

def cms_new_url_for(resource, options={})
  send("new_cms_#{resource_collection_name(resource)}_url", options)
end

#edit_cms_connectable_path(connectable, options = {}) ⇒ Object



27
28
29
30
31
32
33
# File 'app/helpers/cms/path_helper.rb', line 27

def edit_cms_connectable_path(connectable, options={})
  if Portlet === connectable
    edit_cms_portlet_path(connectable, options)
  else
    polymorphic_path([:edit, :cms, connectable], options)        
  end
end