aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching
diff options
context:
space:
mode:
authorChristopher Meiklejohn <christopher.meiklejohn@gmail.com>2011-07-30 00:49:36 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2011-10-31 15:10:07 -0400
commit6cbe4223a77d7ea364b4d2dc46cec6a0c58c9537 (patch)
tree686c05a79a785da3a4ea7ddbcf01be796777e5b9 /actionpack/lib/action_controller/caching
parent1afe269a4aa18a815c509d3f0348ed99a9b4b560 (diff)
downloadrails-6cbe4223a77d7ea364b4d2dc46cec6a0c58c9537.tar.gz
rails-6cbe4223a77d7ea364b4d2dc46cec6a0c58c9537.tar.bz2
rails-6cbe4223a77d7ea364b4d2dc46cec6a0c58c9537.zip
Ensure that the format isn't applied twice to the cache key, else it becomes impossible to target with expire_action.
Diffstat (limited to 'actionpack/lib/action_controller/caching')
-rw-r--r--actionpack/lib/action_controller/caching/actions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb
index 0031d2701f..f6b23e4efc 100644
--- a/actionpack/lib/action_controller/caching/actions.rb
+++ b/actionpack/lib/action_controller/caching/actions.rb
@@ -175,7 +175,7 @@ module ActionController #:nodoc:
private
def normalize!(path)
path << 'index' if path[-1] == ?/
- path << ".#{extension}" if extension and !path.ends_with?(extension)
+ path << ".#{extension}" if extension and !path.split('?').first.try(:ends_with?, ".#{extension}")
URI.parser.unescape(path)
end
end