Created
March 8, 2010 20:19
-
-
Save dbryand/325615 to your computer and use it in GitHub Desktop.
Browsercms monkey patch to allow "uncountable" named content blocks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cms/path_helper' | |
module Cms | |
module PathHelper | |
def cms_index_path_for(resource, options={}) | |
options[:only_path] = false | |
cms_index_url_for(resource, options) | |
end | |
def cms_index_url_for(resource, options={}) | |
options[:controller] ="cms/#{resource_collection_name(resource).pluralize}" | |
options[:action] = "index" | |
url_for(options) | |
end | |
def cms_new_path_for(resource, options={}) | |
options[:only_path] = false | |
cms_new_url_for(resource, options) | |
end | |
def cms_new_url_for(resource, options={}) | |
options[:controller] ="cms/#{resource_collection_name(resource).pluralize}" | |
options[:action] = "new" | |
url_for(options) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment