What happens when you specify a :conditions hash that relies on the included association?
On Apr 24, 7:04 pm, Frederick Cheung <[EMAIL PROTECTED]> wrote: > I stumbled across this today: > > def find_initial(options) > options.update(:limit => 1) unless options[:include] > find_every(options).first > end > > And I can't think why the special casing of include is necessary. > Maybe there was a time when :include didn't do the right thing, but > for at least some time :include has handled this properly, and so any > one doing Foo.find :first, :include => [...] is inadvertently making > rails and the db do a lot more work than they think? > Is this just a relic or is there some reason I missed ? > > Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
