Skip to content

Commit

Permalink
dry up action_methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Sep 29, 2010
1 parent 1c0be7b commit a5f8f59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions actionpack/lib/abstract_controller/base.rb
Expand Up @@ -61,13 +61,13 @@ def hidden_actions
def action_methods
@action_methods ||= begin
# All public instance methods of this class, including ancestors
methods = public_instance_methods(true).map { |m| m.to_s }.to_set -
methods = (public_instance_methods(true) -
# Except for public instance methods of Base and its ancestors
internal_methods.map { |m| m.to_s } +
internal_methods +
# Be sure to include shadowed public instance methods of this class
public_instance_methods(false).map { |m| m.to_s } -
public_instance_methods(false)).map { |x| x.to_s } -
# And always exclude explicitly hidden actions
hidden_actions
hidden_actions.to_a

# Clear out AS callback method pollution
methods.reject { |method| method =~ /_one_time_conditions/ }
Expand Down

0 comments on commit a5f8f59

Please sign in to comment.