diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-02-24 15:12:13 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-02-24 15:12:13 -0800 |
commit | e9d659224bb6610d726bd333a9425b4f8f5796ba (patch) | |
tree | 53896b07fb022135d19377a7f2f38aaf22ef4fcc /actionpack/lib/action_controller/metal/hide_actions.rb | |
parent | 2647a3cabfb88ac0dac318207bf611b0b66d495f (diff) | |
parent | 2a12a04a54590d3a5f2abf4cd4eff3a7b1ee6ef4 (diff) | |
download | rails-e9d659224bb6610d726bd333a9425b4f8f5796ba.tar.gz rails-e9d659224bb6610d726bd333a9425b4f8f5796ba.tar.bz2 rails-e9d659224bb6610d726bd333a9425b4f8f5796ba.zip |
Merge pull request #9406 from rails/3-2-stable-ruby-2
Rails 3.2.x is now compatible with Ruby 2.0.0
Diffstat (limited to 'actionpack/lib/action_controller/metal/hide_actions.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/hide_actions.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/metal/hide_actions.rb b/actionpack/lib/action_controller/metal/hide_actions.rb index b55c4643be..109484d88c 100644 --- a/actionpack/lib/action_controller/metal/hide_actions.rb +++ b/actionpack/lib/action_controller/metal/hide_actions.rb @@ -27,20 +27,14 @@ module ActionController self.hidden_actions = hidden_actions.dup.merge(args.map(&:to_s)).freeze end - def inherited(klass) - klass.class_eval { @visible_actions = {} } - super - end - def visible_action?(action_name) - return @visible_actions[action_name] if @visible_actions.key?(action_name) - @visible_actions[action_name] = !hidden_actions.include?(action_name) + action_methods.include?(action_name) end # Overrides AbstractController::Base#action_methods to remove any methods # that are listed as hidden methods. def action_methods - @action_methods ||= Set.new(super.reject { |name| hidden_actions.include?(name) }) + @action_methods ||= Set.new(super.reject { |name| hidden_actions.include?(name) }).freeze end end end |