> Can I ask, without sounding like a *complete* idiot, what the intent
> of the yield statement would be in this scenario?  My understanding of
> around_filter is to run some code both before and after every action.
> There's already a defined sequence of events going on -- so what would
> one be yielding *to* ?

You're yielding to that 'defined sequence of events'.  it lets you do
stuff like:

          ActiveRecord::Base.cache do
            yield
          end

(though rails does this for you now)

However I've found that it lets you make your larger before_filter /
after filters read much more nicely.


-- 
Cheers

Koz

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to