This project is archived and is in readonly mode.
Allow if option for caches_page
Reported by Paul Horsfall | April 19th, 2008 @ 07:35 PM
This is a patch to allow an if option to be passed to caches_page, much as you can for session management. e.g.
caches_page :index, :if => Proc.new { |c| !c.request.format.json? }
I've included a test, and split the call to caches_page in the test controller into two, so that caches_page is called with and without an if option.
I've also moved the test for whether an action should be cached out of the block passed to after_filter, and instead pass the actions we want caching to after_filter via the only option.
Comments and changes to this ticket
-
josh April 19th, 2008 @ 09:27 PM
- Assigned user set to josh
- State changed from new to open
-
Repository April 19th, 2008 @ 10:21 PM
- State changed from open to resolved
(from [14a40804a29a57ad05ca6bffbe1e5334089593a9]) Add conditional options to caches_page method [#25 state:resolved]
Signed-off-by: Joshua Peek
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 1785 Empty file uploads should not come through as empty Tempfiles Related Rack Ticket: http://rack.lighthouseapp.com/pr...