Just to be sure, an example of a typical sweeper I use is:
class SaveDestroySweeper < ActionController::Caching::Sweeper
observe Bob, Jane, Jill, Ben, Bill, FlowerPot
def after_save(changed_model)
changed_model.expire_cache
end
def after_destroy(changed_model)
changed_model.expire_cache
end
end
Looking at the comments in sweeping.rb within the rails source tells
you all about it. I don't really do the controller filtering as I run
it all through model changes.
Nahum
On Nov 13, 10:08 am, Henry Maddocks <[EMAIL PROTECTED]> wrote:
> On 12/11/2008, at 4:53 PM, nahum wrote:
>
>
>
> > All I've ever done to get them going in added to observers within
> > environment.rb and specified 'observes SomeModel'. remember to
> > restart your dev webserver when you change env.rb :-)
>
> I thought I saw you do this once which is why I asked. None of the
> docs I have read mention declaring your obsevers but I guess it's
> implied. I'll give it a go and see what happens.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"WellRailed" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/WellRailed?hl=en
-~----------~----~----~----~------~----~------~--~---