This project is archived and is in readonly mode.
Action caching (blocker): undefined local variable or method `cache'
-
ximus
Rails versions concerned are version 3.beta3 and current master branch
-
ximus
Now that I think of it, you can trigger this as so:
@@@ruby AnyController < ApplicationController
caches_action :any_action # ... end -
ximus
Now that I think of it, you can trigger this as so:
AnyController < ApplicationController caches_action :any_action # ... endwith config.action_controller.perform_caching = true
-
Neeraj Singh
caches_action :index
Above code is working fine for me with rails3 edge.
-
Paul Barry
I'm using master aaaa1782b44c620cecb97238534a2bd2be5d365a and ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-darwin10.3.0], MBARI 0x6770, Ruby Enterprise Edition 2010.01
I have not been able to reproduce this problem with config.action_controller.perform_caching = true in the development environment. It is caching the action and serving the cached file.
-
Ryan Bigg
Ximus, can you still replicate this?
-
Ryan Bigg
- State changed from new to open
-
ximus
I overlooked something, it happens when you specify :layout => false
AnyController < ApplicationController caches_action :any_action, :layout => false # ... endSorry about that, tried it against master just now and I'm getting the error message
undefined local variable or method
cache' for #<ActionController::Caching::Actions::ActionCacheFilter:...>Working with standard MRI 1.8.7 on osx.
-
Ryan Bigg
- State changed from open to incomplete
Please submit a failing test case for this if you could.
-
Neeraj Singh
Attached is a patch which contains code change and tests.
ActionCachingTestController catches all the exceptions and returns head 500. However most of the tests were not checking for response_code. Hence this bug was not caught in the test. All I had to do was to ensure that all tests check for response code.
-
Neeraj Singh
- Tag changed from actioncontroller, caching, rails3 to actioncontroller, caching, patch, rails3
-
ximus
Thanks Neeraj.
-
José Valim
- Milestone cleared.
- State changed from incomplete to open
- Assigned user set to José Valim
-
Repository
- State changed from open to resolved
(from [d793d30776737e46ead49d90dcba411c3dfd6edf]) ActionCachingTestController rescues from all exceptions. Making sure that all the tests check for valid response. [#4468 Action caching (blocker): undefined local variable or method `cache' state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/d793d30776737e46ead49d90dcba41...
