I just created this ticket and added a patch to fix the issue + test cases. Could someone please review and apply the patch? When the :joins option is included in a call to with_scope, the :joins in the find options are ignored. This patch updates the add_joins! method to add the :joins option from the scope and from the find options. with_scope( :find => { :joins => "left join geocodings on users.id geocodings.geocodable_id" } ) do find( :all, :joins => "left join taggings on users.id taggings.taggable_id" ) end Currently outputs: SELECT users.* FROM users left join geocodings on users.id geocodings.geocodable_id With this patch, it outputs: SELECT users.* FROM users left join taggings on users.id taggings.taggable_id left join geocodings on users.id geocodings.geocodable_id --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2007-Jul-14 09:07 UTC
Re: #8975 [PATCH] with_scope :joins clobber find :joins
> I just created this ticket and added a patch to fix the issue + test > cases. Could someone please review and apply the patch?Ask for some reviewers on the #rails-contrib irc channel. It sounds like a bug and if you can get the patch verified, it should probably be applied. http://wiki.rubyonrails.org/rails/pages/PatchRequirements -- 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Gabe da Silveira
2007-Jul-14 19:31 UTC
Re: #8975 [PATCH] with_scope :joins clobber find :joins
I posted my feedback to the ticket. http://dev.rubyonrails.org/ticket/8975 The few times I''ve been in #rails-contrib no one is responsive. Is that really better than using rails-core to ask for reviewers? I guess using both is best. On 7/14/07, Michael Koziarski <michael@koziarski.com> wrote:> > > I just created this ticket and added a patch to fix the issue + test > > cases. Could someone please review and apply the patch? > > Ask for some reviewers on the #rails-contrib irc channel. It sounds > like a bug and if you can get the patch verified, it should probably > be applied. > > http://wiki.rubyonrails.org/rails/pages/PatchRequirements > > > -- > Cheers > > Koz > > > >-- Gabe da Silveira http://darwinweb.net --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2007-Jul-14 22:13 UTC
Re: #8975 [PATCH] with_scope :joins clobber find :joins
> The few times I''ve been in #rails-contrib no one is responsive. Is > that really better than using rails-core to ask for reviewers? I > guess using both is best.Using the mailing list is fine too :). -- 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 rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---