X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/0e19a9290d77430dc68479ea469f19fb83ab0fcc..af70363d029202b53c5813e06117dfdc1208cccd:/app/controllers/application_controller.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c50c5f664..1605e1133 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -249,6 +249,16 @@ class ApplicationController < ActionController::Base options = actions.extract_options! cache_path = options[:cache_path] || Hash.new + options[:unless] = case options[:unless] + when NilClass then Array.new + when Array then options[:unless] + else unlessp = [ options[:unless] ] + end + + options[:unless].push(Proc.new do |controller| + controller.params.include?(:page) + end) + options[:cache_path] = Proc.new do |controller| cache_path.merge(controller.params).merge(:locale => I18n.locale) end