i’m looking at the peepcode video on caching with rails. later on in
the video he shows a little hack so that the there will be a cached
index.html file when you have a default route for the controller that
you want cached.
he does it by adding an after filter for the index page:
after_filter :cache_index, :only => [:index] and then adding that
method in the controller:
protected
def cache_index
if(ActionController::Base.perform_caching)
FileUtils.cp File.join(RAILS_ROOT, ‘public’, ‘tallies.html’),
File.join(RAILS_ROOT, ‘public’, ‘index.html’)
end
end
when using this though, i get the following error:
uninitialized constant
ActionWebService::Dispatcher::ActionController::Base
can anyone tell me why it’s doing this?
thanks