aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorThomas von Deyen <tvd@magiclabs.de>2011-12-06 13:05:15 +0100
committerThomas von Deyen <tvd@magiclabs.de>2011-12-06 13:05:15 +0100
commit0da31a1839d03e597f8ce0ae853b3a75519f325a (patch)
tree7e846eeaadadb3b28d5d724de8ae8bf7f10d2b0e /actionpack/lib
parent81fec5dfc4adb06072aa7059f5c6554171eafb68 (diff)
downloadrails-0da31a1839d03e597f8ce0ae853b3a75519f325a.tar.gz
rails-0da31a1839d03e597f8ce0ae853b3a75519f325a.tar.bz2
rails-0da31a1839d03e597f8ce0ae853b3a75519f325a.zip
Allowing string as url argument for expire_action
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/caching/actions.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb
index f988de39dd..3b86a9a93a 100644
--- a/actionpack/lib/action_controller/caching/actions.rb
+++ b/actionpack/lib/action_controller/caching/actions.rb
@@ -116,9 +116,8 @@ module ActionController #:nodoc:
def expire_action(options = {})
return unless cache_configured?
- actions = options[:action]
- if actions.is_a?(Array)
- actions.each {|action| expire_action(options.merge(:action => action)) }
+ if options.is_a?(Hash) && options[:action].is_a?(Array)
+ options[:action].each {|action| expire_action(options.merge(:action => action)) }
else
expire_fragment(ActionCachePath.new(self, options, false).path)
end