Skip to content

Commit

Permalink
Changed some methods names because of a conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Oct 10, 2008
1 parent 144de66 commit ab631bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ardes/resources_controller/include_actions.rb
Expand Up @@ -17,15 +17,15 @@ def include_actions(controller, options = {})
options.assert_valid_keys(:only, :except)
raise ArgumentError, "you can only specify either :except or :only, not both" if options[:only] && options[:except]
mixin = self.dup
actions_to_remove(options).each {|a| mixin.remove_action(a) }
action_methods_to_remove(options).each {|a| mixin.remove_action_method(a) }
controller.send :include, mixin
end

def remove_action(action)
def remove_action_method(action)
undef_method action
end

def actions_to_remove(options = {})
def action_methods_to_remove(options = {})
if options[:only]
instance_methods - options[:only].map(&:to_s)
elsif options[:except]
Expand Down

0 comments on commit ab631bc

Please sign in to comment.