Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7949

Show
Ignore:
Timestamp:
10/16/07 22:24:55 (1 year ago)
Author:
bitsweat
Message:

caches_page uses a single after_filter instead of one per action. Closes #9891.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r7947 r7949  
    11*SVN* 
     2 
     3* caches_page uses a single after_filter instead of one per action.  #9891 [lifofifo] 
    24 
    35* Update Prototype to 1.6.0_rc1 and script.aculo.us to 1.8.0 preview 0.  [sam, madrobby] 
  • trunk/actionpack/lib/action_controller/caching.rb

    r7726 r7949  
    101101        def caches_page(*actions) 
    102102          return unless perform_caching 
    103           actions.each do |action| 
    104             class_eval "after_filter { |c| c.cache_page if c.action_name == '#{action}' }" 
    105           end 
     103          actions = actions.map(&:to_s) 
     104          after_filter { |c| c.cache_page if actions.include?(c.action_name) } 
    106105        end 
    107106