Dup/Select/Uniq  11.380000   0.100000  11.480000 ( 11.517070)
Group_By          0.020000   0.000000   0.020000 (  0.014287)
----------------------------------------- total: 11.500000sec

Ruby On group objects in array

by toro04, March 31, 2010 18:14

Ben, thanks for showing me ...

8abd3736ee784dcd159d3b26b882076e Talk
require 'rubygems'
require 'active_support'
Foo = Struct.new(:id, :status_id, :profile_id)
...

Ruby On group objects in array

by toro04, March 30, 2010 18:12

Ben, good point about just ...

8abd3736ee784dcd159d3b26b882076e Talk
grouped = [] 
arr = [#<Foo id: 1, status_id: 2, profile_id: 3>,#<Foo id: 2, status_id: 2, profile_id: 3>,#<Foo id: 3, status_id: 1, profile_id: 3>]
arr_copy = arr
...

Ruby group objects in array

by toro04, March 29, 2010 13:44, 4 refactorings, tagged with array

I'm looking for an optimal ...

8abd3736ee784dcd159d3b26b882076e Talk