Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Michael Koziarski
> I have submitted a new patch file for > http://dev.rubyonrails.org/ticket/4132 that no longer produces any > conflicts or errors during the unit tests. Applied > This is supposed to combine :include's in a compatible fashion since > they can either be an Array, Hash or a Symbol. Shame that Obj

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
On 3/26/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > On 3/26/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > > On 3/26/06, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > > The reason I created this patch is explained in the ticket and that I > > > > figured the :include route was a bit clean

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
On 3/26/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > On 3/26/06, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > The reason I created this patch is explained in the ticket and that I > > > figured the :include route was a bit cleaner from a users perspective > > > than a combo of :select and

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
On 3/26/06, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > The reason I created this patch is explained in the ticket and that I > > figured the :include route was a bit cleaner from a users perspective > > than a combo of :select and :joins. > > The patch no longer applies cleanly, and seems to

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Michael Koziarski
> The reason I created this patch is explained in the ticket and that I > figured the :include route was a bit cleaner from a users perspective > than a combo of :select and :joins. The patch no longer applies cleanly, and seems to cause quite a few failures (unless I've screwed up the merge). C

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Tobias Lütke
> class WidgetController < ApplicationController > around_filter ScopedFilter.new(SiteWidget, {:find => {:include => > [:site_root], :condtions => 'site_root.site_id = X'}}) > > def show_widgets > @widgets = Widget.find :all, :include => [:some_other_relation] > end > end Get your site o

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Michael Koziarski
On 3/27/06, David Heinemeier Hansson <[EMAIL PROTECTED]> wrote: > > So my question is... were my assumptions wrong (ie. my reasonings for > > implementing :include) and will :include just not be supported and > > should I just use the :select, :join combonation from this point? > > I understand the

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
> > So my question is... were my assumptions wrong (ie. my reasonings for > > implementing :include) and will :include just not be supported and > > should I just use the :select, :join combonation from this point? > > I understand the mechanics of the patch, but not the benefit. What's > the use c

Re: [Rails-core] comment on new :select support for with_scope

2006-03-26 Thread David Heinemeier Hansson
> So my question is... were my assumptions wrong (ie. my reasonings for > implementing :include) and will :include just not be supported and > should I just use the :select, :join combonation from this point? I understand the mechanics of the patch, but not the benefit. What's the use case where y

[Rails-core] comment on new :select support for with_scope

2006-03-26 Thread Andrew Kaspick
Hi there, I noticed that :select has been added as a supported keyword for with_scope. I created a patch at http://dev.rubyonrails.org/ticket/4132 for adding :include support to with_scope because of issues I was having with using just :joins and the lack of :select support. The reason I created