1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Proc objects for cache_path for caches_action no longer need controller object, nor to use send when calling routing helpers

This commit is contained in:
Ryan Bigg 2011-03-26 11:34:05 +11:00
parent eb8beb32b0
commit 198f3883fa

View file

@ -56,19 +56,18 @@ module ActionController #:nodoc:
# #
# caches_page :public # caches_page :public
# #
# caches_action :index, :if => proc do |c| # caches_action :index, :if => proc do
# !c.request.format.json? # cache if is not a JSON request # !request.format.json? # cache if is not a JSON request
# end # end
# #
# caches_action :show, :cache_path => { :project => 1 }, # caches_action :show, :cache_path => { :project => 1 },
# :expires_in => 1.hour # :expires_in => 1.hour
# #
# caches_action :feed, :cache_path => proc do |c| # caches_action :feed, :cache_path => proc do
# if c.params[:user_id] # if params[:user_id]
# c.send(:user_list_url, # user_list_url(params[:user_id, params[:id])
# c.params[:user_id], c.params[:id])
# else # else
# c.send(:list_url, c.params[:id]) # list_url(params[:id])
# end # end
# end # end
# end # end