Abram ha scritto:
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.

I'm not an expert of performances, but maybe databases like postgres or mysql are faster than other solutions to retrieve data from a complex query, so the solution to run a new query is better than filtering a ruby collection, which can be simple but can already be very very complex (think to db like openstreetmaps and you want to calculate a path...)

--
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].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to