This is 'worst-practices'! Actually, it's just cruft left over from integrating AlteredBeast. If you find more like this, please let me know or fix 'em up and submit a pull request.Thanks! Bruno
On Sat, Aug 23, 2008 at 11:31 AM, Carl Fyffe <[EMAIL PROTECTED]> wrote: > > Forgot the pastie for quick access to the code in question: > > http://pastie.org/258608 > > On Sat, Aug 23, 2008 at 12:30 PM, Carl Fyffe <[EMAIL PROTECTED]> wrote: > > AlteredBeast's PostController has before_filters: find_user, > > require_current_user that are run for create and update, so why do > > create and update both run User.find(params[:user_id]) when @user has > > been populated already by the two before filters? This seems very > > redundant. It is definitely repeated db calls. This may not matter > > since db calls are cached per request now... > > > > In my application I am almost always going to need two bits of > > information, the user and the company the user belongs to, is it valid > > to have a single before_filter that populates those two instance > > variables? Or should I follow the example of AlteredBeast? > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CommunityEngine" 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/communityengine?hl=en -~----------~----~----~----~------~----~------~--~---
