diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-29 11:47:27 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-29 11:47:54 -0700 |
commit | a5f8f5908116081a3461409eda53e62d997d5b40 (patch) | |
tree | 985f0f0abaf5a4f0a80b4f68daaa3160b5f5aa7a | |
parent | 1c0be7baac8e736e2ddd659ac2d6ef1845f756c7 (diff) | |
download | rails-a5f8f5908116081a3461409eda53e62d997d5b40.tar.gz rails-a5f8f5908116081a3461409eda53e62d997d5b40.tar.bz2 rails-a5f8f5908116081a3461409eda53e62d997d5b40.zip |
dry up action_methods
-rw-r--r-- | actionpack/lib/abstract_controller/base.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index 85270d84d8..ce88803a9c 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -61,13 +61,13 @@ module AbstractController 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/ } |