Skip to content

Commit

Permalink
don't explode if action has already been undef'd
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgolick committed Nov 7, 2008
1 parent 553125c commit 052a32b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/resource_controller/class_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def actions(*opts)
actions_to_remove += [*config[:except]] if config[:except]
actions_to_remove.uniq!

actions_to_remove.each { |action| undef_method(action)}
actions_to_remove.each { |action| undef_method(action) if instance_methods.include?(action.to_s) }
end

end
end
end

0 comments on commit 052a32b

Please sign in to comment.