diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-28 09:49:02 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-28 09:49:02 -0500 |
commit | de203245afd2bbf7f93f3241fcf3a71a88101d47 (patch) | |
tree | 3fbae223e10f0e50da6d9fdfc2c70a742c34ac26 /actionpack/lib/action_controller/new_base/hide_actions.rb | |
parent | dd98280e38d640f5724887cf8a715b79f0439d2d (diff) | |
download | rails-de203245afd2bbf7f93f3241fcf3a71a88101d47.tar.gz rails-de203245afd2bbf7f93f3241fcf3a71a88101d47.tar.bz2 rails-de203245afd2bbf7f93f3241fcf3a71a88101d47.zip |
Revert "Revert "Whitespace!""
This reverts commit 0cac68d3bed3e6bf8ec2eb994858e4a179046941.
Diffstat (limited to 'actionpack/lib/action_controller/new_base/hide_actions.rb')
-rw-r--r-- | actionpack/lib/action_controller/new_base/hide_actions.rb | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/actionpack/lib/action_controller/new_base/hide_actions.rb b/actionpack/lib/action_controller/new_base/hide_actions.rb index a29b09a893..10b8b582f5 100644 --- a/actionpack/lib/action_controller/new_base/hide_actions.rb +++ b/actionpack/lib/action_controller/new_base/hide_actions.rb @@ -7,27 +7,33 @@ module ActionController self.hidden_actions ||= Set.new end - def action_methods() self.class.action_names end - def action_names() action_methods end - - private - - def action_method?(action_name) - !hidden_actions.include?(action_name) && super + def action_methods + self.class.action_names end - - module ClassMethods - def hide_action(*args) - args.each do |arg| - self.hidden_actions << arg.to_s - end - end - - def action_methods - @action_names ||= Set.new(super.reject {|name| self.hidden_actions.include?(name.to_s)}) - end - def self.action_names() action_methods end + def action_names + action_methods end + + private + def action_method?(action_name) + !hidden_actions.include?(action_name) && super + end + + module ClassMethods + def hide_action(*args) + args.each do |arg| + self.hidden_actions << arg.to_s + end + end + + def action_methods + @action_names ||= Set.new(super.reject {|name| self.hidden_actions.include?(name.to_s)}) + end + + def self.action_names + action_methods + end + end end -end
\ No newline at end of file +end |