У Чцв, 24/04/2008 у 20:26 -0700, Xavier Shay піша: > What happens when you specify a :conditions hash that relies on the > included association? > It's not very obvious, but it's supported. Whole bunch of code is there to support it (and according to git history it was there since late 2005 (svn r2675). Look at ActiveRecord::Associations::ClassMethods#add_limited_ids_condition!
Not adding limit was commited in r1811 along with initial support for :limit and :include. Actually, even then it could be smarter. I.e. :limit => 1 could be left if all included associations are :belong_to or :has_one. Then when proper support was implemented, somebody simply forgot to remove it. -- Aliaksey Kandratsenka <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
