Wednesday, February 16, 2011

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

No comments: