diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-11 15:03:24 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-11 15:03:24 -0700 |
commit | 0cac68d3bed3e6bf8ec2eb994858e4a179046941 (patch) | |
tree | 6f6d89a9bf66064e4acb8392d54648b4bf37f9f0 /actionpack/lib/action_controller/new_base/hide_actions.rb | |
parent | ddbeb15a5e7e0c3c5f316ccf65b557bc5311a6c4 (diff) | |
download | rails-0cac68d3bed3e6bf8ec2eb994858e4a179046941.tar.gz rails-0cac68d3bed3e6bf8ec2eb994858e4a179046941.tar.bz2 rails-0cac68d3bed3e6bf8ec2eb994858e4a179046941.zip |
Revert "Whitespace!"
This reverts commit a747ab5b20b9d543e9d311070e3b720c761ae716.
Diffstat (limited to 'actionpack/lib/action_controller/new_base/hide_actions.rb')
-rw-r--r-- | actionpack/lib/action_controller/new_base/hide_actions.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/new_base/hide_actions.rb b/actionpack/lib/action_controller/new_base/hide_actions.rb index 422ea180c4..aa420442fb 100644 --- a/actionpack/lib/action_controller/new_base/hide_actions.rb +++ b/actionpack/lib/action_controller/new_base/hide_actions.rb @@ -6,20 +6,21 @@ module ActionController end def action_methods() self.class.action_names end - def action_names() action_methods end - + def action_names() action_methods end + private + def respond_to_action?(action_name) !hidden_actions.include?(action_name) && (super || respond_to?(:method_missing)) 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 @@ -27,4 +28,4 @@ module ActionController def self.action_names() action_methods end end end -end +end
\ No newline at end of file |