On Sunday, 4 November 2012 03:38:56 UTC-5, Abram wrote:
>
> Jim, Thanks for that. 
>
> What I mean is I want small and large black products attached to two 
> separate variables, say @blacksmall and @blacklarge.. both separated out 
> from @products which initially resulted from the Product.where(:color => 
> 'black) query. I know it's a stupid example, but I'm just wanting that 
> functionality, and think it would be an improvement in rails to enable 
> using active record queries on objects that are arrays of objects as they 
> are represented in the table. If rails treats table rows as model objects 
> why not treat a collection of model objects in the same way, allowing the 
> same dsl for access/limiting what's within the collection. 


An interesting idea, but by the time you've written enough code to support 
things like joins you've basically recreated an RDBMS inside of 
ActiveRecord. The alternative would be to support only a subset, but that 
seems *worse* than no support at all...

--Matt Jones
 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/TDBLe3soBZ0J.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to