aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/hide_actions.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-05-07 10:45:29 -0500
committerJoshua Peek <josh@joshpeek.com>2009-05-07 10:45:29 -0500
commita747ab5b20b9d543e9d311070e3b720c761ae716 (patch)
treec8e671f1f6a722b56d5ca005977fbe2e210ffda5 /actionpack/lib/action_controller/new_base/hide_actions.rb
parentaf40fa6d036d86895e7be4ef46a615d44eb41ede (diff)
downloadrails-a747ab5b20b9d543e9d311070e3b720c761ae716.tar.gz
rails-a747ab5b20b9d543e9d311070e3b720c761ae716.tar.bz2
rails-a747ab5b20b9d543e9d311070e3b720c761ae716.zip
Whitespace!
Diffstat (limited to 'actionpack/lib/action_controller/new_base/hide_actions.rb')
-rw-r--r--actionpack/lib/action_controller/new_base/hide_actions.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/new_base/hide_actions.rb b/actionpack/lib/action_controller/new_base/hide_actions.rb
index aa420442fb..422ea180c4 100644
--- a/actionpack/lib/action_controller/new_base/hide_actions.rb
+++ b/actionpack/lib/action_controller/new_base/hide_actions.rb
@@ -6,21 +6,20 @@ 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
@@ -28,4 +27,4 @@ module ActionController
def self.action_names() action_methods end
end
end
-end \ No newline at end of file
+end