diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2011-03-26 11:34:05 +1100 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2011-03-26 11:34:05 +1100 |
commit | 198f3883fab0a8b5ec96f5365286620344b0e6e7 (patch) | |
tree | 7990b6167ab682f7d624bcdbce9506177f23d7ad /actionpack/lib/action_controller | |
parent | eb8beb32b072f581720111d87855610403b3bb0c (diff) | |
download | rails-198f3883fab0a8b5ec96f5365286620344b0e6e7.tar.gz rails-198f3883fab0a8b5ec96f5365286620344b0e6e7.tar.bz2 rails-198f3883fab0a8b5ec96f5365286620344b0e6e7.zip |
Proc objects for cache_path for caches_action no longer need controller object, nor to use send when calling routing helpers
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/caching/actions.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb index 2c8a6e4d4d..5fc6956266 100644 --- a/actionpack/lib/action_controller/caching/actions.rb +++ b/actionpack/lib/action_controller/caching/actions.rb @@ -56,19 +56,18 @@ module ActionController #:nodoc: # # caches_page :public # - # caches_action :index, :if => proc do |c| - # !c.request.format.json? # cache if is not a JSON request + # caches_action :index, :if => proc do + # !request.format.json? # cache if is not a JSON request # end # # caches_action :show, :cache_path => { :project => 1 }, # :expires_in => 1.hour # - # caches_action :feed, :cache_path => proc do |c| - # if c.params[:user_id] - # c.send(:user_list_url, - # c.params[:user_id], c.params[:id]) + # caches_action :feed, :cache_path => proc do + # if params[:user_id] + # user_list_url(params[:user_id, params[:id]) # else - # c.send(:list_url, c.params[:id]) + # list_url(params[:id]) # end # end # end |