Sweet, Koz, thanks a lot. Looking at the AssociationProxy implementation I don't quite know how I'd go about refactoring that #reload method to work like AR::Base#reload. To be honest, I hadn't noticed the lock! method before and now that you've pointed it out I'll probably just stick to it. lock! is more intention revealing anyways so I'm happy to use it in favor of reload and ignore the reload problem for the time being :)
Cheers, Andrew On Nov 18, 10:24 am, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > > So, long story short, the implementation of AssociationProxy exposes > > itself when using the #reload(:lock => true) technique to elevate a > > lock. My question to the core is whether or not this is an acceptable > > side effect of the implementation? In particular, I am curious if > > using this #reload method of lock escalation is a supported mode of > > operation, or is there some other means to the same end that is better > > supported by ActiveRecord? For instance, I suppose I could do this > > (hopefully the formatting on this doesn't get bojacked): > > Nice find, that's definitely not an acceptable side-effect of the > implementation. A patch to address this would be great. > > In the meantime you can use @record.whatever.lock! which will behave > as expected. > > -- > 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 -~----------~----~----~----~------~----~------~--~---
