On Jun 29, 10:43 pm, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > Edge Rails currently has a bug / misfeature regarding around filters > which don't yield, the intention is to support cases like this: > > around_filter :authorization_required > > def authorization_required > if logged_in? > yield > else > redirect_to authentication_url > end > end
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* ? For example, in a before_filter, if I want "normal processing" to occur, I just make sure I don't return false from my filter method. I don't have to explicitly "yield" back to keep the ball moving. Obviously the intent here is for something more interesting - can you say a word or two about it? Thanks! Jeff (feel free to continue this on rails-talk instead, if that's more appropriate) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
