Ruby Sorting Manually by created at
Hi,
I have used this for sorting manually.
@results.sort{|x, y| x.send(:created_at) <=> y.send(:created_at)}
P.S. @results is an array tht has many records.
Concepts and Code
I have used this for sorting manually.
@results.sort{|x, y| x.send(:created_at) <=> y.send(:created_at)}
P.S. @results is an array tht has many records.
Concepts and Code
Comments