One more question..
I have many collections of clients, in example
clients1 = Client.find(:all, :condtions => "id < 10")
clients2 = Client.find(:all, :conditions => "id > 5")
clients3 = Client.find(:all, :conditions => "id in (3, 5, 7, 9, 11)
So I want to find the common clients between them in a common array, I
mean, clients_array has to contain the clients 7 and 9..
I know I can do
clients = clients1.find_all {|x| clients2.find { |y| x.id == y.id} }
clients = clients.find_all {|x| clients3.find { |y| x.id == y.id} }
is there an easy way or a better way to get the same results?
Rodrigo Dominguez
Iplan Networks Datos Personales
rdominguez@iplan.com.ar rorra@rorra.com.ar
www.iplan.com.ar <http://www.iplan.com.ar/>
www.rorra.com.ar <http://www.rorra.com.ar/>
5031-6303 15-5695-6027
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060830/a1fd8f9a/attachment-0001.html