Displaying 1 result from an estimated 1 matches for "arrange_actions".
2008 Mar 03
0
Overriding ActionController method in an app
...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 ||= "#{path_prefix}/#{path_segment}"
  end
end
but it doesn''t work. and, actually, no matter how hard i try (using
this or other code) i can''t seem to override the path method, even to
just cause it r...