Hey there, I was just playing around with Beta3 and noticed that Page.select(:id).select(:title).all was ignoring the first select. Personally I''d prefer it to be merged together which seems easy from my naive point of view but I''d also be happy if the docs would state that it is not chainable or event better if it wasn''t chainable or would throw a warning. I''d prefer it to be mergable since the .order() is mergable too and that would make the whole thing a little bit more powerful and consistent. Kind regards, John -- 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.
I thought about doing that. But the current behaviour is for consistency with with_scope :>> User.send(:with_scope, :find => {:select => ''id''}) { User.first(:select => "name") }User Load (0.3ms) SELECT name FROM `users` LIMIT 1 Maybe we can change the behaviour for 3.1 though. On Wed, Apr 21, 2010 at 12:46 PM, hukl <jpbader@gmail.com> wrote:> Hey there, > > > I was just playing around with Beta3 and noticed that > Page.select(:id).select(:title).all was ignoring the first select. > Personally I''d prefer it to be merged together which seems easy from > my naive point of view but I''d also be happy if the docs would state > that it is not chainable or event better if it wasn''t chainable or > would throw a warning. I''d prefer it to be mergable since the .order() > is mergable too and that would make the whole thing a little bit more > powerful and consistent. > > Kind regards, John > > -- > 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. > >-- http://m.onkey.org | http://twitter.com/lifo -- 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.
Alright, I see. Thanks for the info! *waiting for 3.1* ;) On Apr 21, 1:56 pm, Pratik <pratikn...@gmail.com> wrote:> I thought about doing that. But the current behaviour is for > consistency with with_scope : > > >> User.send(:with_scope, :find => {:select => ''id''}) { User.first(:select => "name") } > > User Load (0.3ms) SELECT name FROM `users` LIMIT 1 > > Maybe we can change the behaviour for 3.1 though. > > > > > > On Wed, Apr 21, 2010 at 12:46 PM, hukl <jpba...@gmail.com> wrote: > > Hey there, > > > I was just playing around with Beta3 and noticed that > > Page.select(:id).select(:title).all was ignoring the first select. > > Personally I''d prefer it to be merged together which seems easy from > > my naive point of view but I''d also be happy if the docs would state > > that it is not chainable or event better if it wasn''t chainable or > > would throw a warning. I''d prefer it to be mergable since the .order() > > is mergable too and that would make the whole thing a little bit more > > powerful and consistent. > > > Kind regards, John > > > -- > > 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 athttp://groups.google.com/group/rubyonrails-core?hl=en. > > --http://m.onkey.org|http://twitter.com/lifo > > -- > 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 athttp://groups.google.com/group/rubyonrails-core?hl=en.-- 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.