Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Allow if option for caches_page

#25

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.

Reported by Paul Horsfall · April 19th, 2008 @ 07:35 PM

State: resolved
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. josh
    josh
    • Assigned user set to josh
    • State changed from new to open

    April 19th, 2008 @ 09:27 PM

  2. Repository
    Repository
    • State changed from open to resolved

    (from [14a40804a29a57ad05ca6bffbe1e5334089593a9]) Add conditional options to caches_page method [#25 state:resolved]

    Signed-off-by: Joshua Peek

    http://github.com/rails/rails/co...

    April 19th, 2008 @ 10:21 PM