mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
caches_page uses a single after_filter instead of one per action. Closes #9891.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7949 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
45107ecaf8
commit
011a209174
2 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* caches_page uses a single after_filter instead of one per action. #9891 [lifofifo]
|
||||
|
||||
* Update Prototype to 1.6.0_rc1 and script.aculo.us to 1.8.0 preview 0. [sam, madrobby]
|
||||
|
||||
* Dispatcher: fix that to_prepare should only run once in production. #9889 [Nathaniel Talbott]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue