diff options
Diffstat (limited to 'actionpack/lib/action_controller/caching.rb')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index 9ca0fa53df..3c2202e038 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -100,9 +100,8 @@ module ActionController #:nodoc: # matches the triggering url. def caches_page(*actions) return unless perform_caching - actions.each do |action| - class_eval "after_filter { |c| c.cache_page if c.action_name == '#{action}' }" - end + actions = actions.map(&:to_s) + after_filter { |c| c.cache_page if actions.include?(c.action_name) } end private |