Hi,
I want to perform an operation on a array returned from an ActiveRecord query. This is the functionality I would have done on the ActiveRecord directly.
Modification.find(:all, :group=>'ref_id,start_date', :order=>'updated_at desc')
The above is working fine as expected. But the problem is I cannot perform it directly for some reasons. But I have an array. I cannot use :group
symbol on an array for the obvious reason that is not an ActiveRecord. But I would want the same functionality. Something like
modifications = Modification.all
modifications.find(:all, :group=>'ref_id,start_date').sort(:order=>&:updated_at)
The above one would not work for obvious reasons, but how to do a similar ActiveRecord implementation for the Array.