Module: Cms::PathHelper
- Included in:
- ApplicationController
- Defined in:
- app/helpers/cms/path_helper.rb
Instance Method Summary collapse
- #cms_connectable_path(connectable, options = {}) ⇒ Object
- #cms_index_path_for(resource, options = {}) ⇒ Object
- #cms_index_url_for(resource, options = {}) ⇒ Object
- #cms_new_path_for(resource, options = {}) ⇒ Object
- #cms_new_url_for(resource, options = {}) ⇒ Object
- #edit_cms_connectable_path(connectable, options = {}) ⇒ Object
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, ={}) 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, ={}) send("cms_#{resource_collection_name(resource).pluralize}_path", ) 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, ={}) send("cms_#{resource_collection_name(resource).pluralize}_url", ) 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, ={}) send("new_cms_#{resource_collection_name(resource)}_path", ) 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, ={}) send("new_cms_#{resource_collection_name(resource)}_url", ) 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, ={}) if Portlet === connectable edit_cms_portlet_path(connectable, ) else polymorphic_path([:edit, :cms, connectable], ) end end |