Permalink
Browse files

Proc objects for cache_path for caches_action no longer need controll…

…er object, nor to use send when calling routing helpers
  • Loading branch information...
radar committed Mar 26, 2011
1 parent eb8beb3 commit 198f3883fab0a8b5ec96f5365286620344b0e6e7
Showing with 6 additions and 7 deletions.
  1. +6 −7 actionpack/lib/action_controller/caching/actions.rb
@@ -56,19 +56,18 @@ module Caching
#
# 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

0 comments on commit 198f388

Please sign in to comment.