aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-06-10 22:00:55 +0200
committerXavier Noria <fxn@hashref.com>2010-06-10 22:00:55 +0200
commit63560660062d552d6bbebec007154f0c639bf865 (patch)
tree0ff7ee5c1a63815685e9640ca4a9ceafb7732178 /actionpack/lib/action_controller
parent59e89facc2264322bcab59c9a8622380b62d4d40 (diff)
parent61fc7a455099f179de88967f403f2038b9d3c821 (diff)
downloadrails-63560660062d552d6bbebec007154f0c639bf865.tar.gz
rails-63560660062d552d6bbebec007154f0c639bf865.tar.bz2
rails-63560660062d552d6bbebec007154f0c639bf865.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/caching/sweeping.rb1
-rw-r--r--actionpack/lib/action_controller/metal/hide_actions.rb6
2 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/caching/sweeping.rb b/actionpack/lib/action_controller/caching/sweeping.rb
index cf16417e84..e9db0d97b6 100644
--- a/actionpack/lib/action_controller/caching/sweeping.rb
+++ b/actionpack/lib/action_controller/caching/sweeping.rb
@@ -57,6 +57,7 @@ module ActionController #:nodoc:
def before(controller)
self.controller = controller
callback(:before) if controller.perform_caching
+ true # before method from sweeper should always return true
end
def after(controller)
diff --git a/actionpack/lib/action_controller/metal/hide_actions.rb b/actionpack/lib/action_controller/metal/hide_actions.rb
index 3358d80c35..32d7a96701 100644
--- a/actionpack/lib/action_controller/metal/hide_actions.rb
+++ b/actionpack/lib/action_controller/metal/hide_actions.rb
@@ -8,7 +8,7 @@ module ActionController
included do
class_attribute :hidden_actions
- self.hidden_actions = Set.new
+ self.hidden_actions = Set.new.freeze
end
private
@@ -25,7 +25,7 @@ module ActionController
# ==== Parameters
# *args<#to_s>:: A list of actions
def hide_action(*args)
- self.hidden_actions = hidden_actions.dup.merge(args.map(&:to_s))
+ self.hidden_actions = hidden_actions.dup.merge(args.map(&:to_s)).freeze
end
def inherited(klass)
@@ -41,7 +41,7 @@ module ActionController
# 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) })
end
end
end