Displaying 1 result from an estimated 1 matches for "path_seg".
Did you mean:
path_sep
2008 Mar 03
0
Overriding ActionController method in an app
...o i was hoping to override the methods in ActionController required
to make the patch to my app only. i created a file called
''path_patch.rb'' and put it in my config/initializers dir, which
contains the following:
ActionController::Resources::Resource.class_eval do
attr_reader :path_segment
def initialize(entities, options)
@plural ||= entities
@singular ||= options[:singular] || plural.to_s.singularize
@path_segment = options.delete(:as) || @plural
@options = options
arrange_actions
add_default_actions
set_prefixes
end
def path
@path ||...