On Feb 6, 2012, at 12:37 PM, Christopher Jones wrote:

> Game.find(:all, :limit => 5, :order=> 'created_at')

Roughly, that's the first 5 created not the last, so you'd need to sort in 
descending order. These days I'm going new-school:

Game.all().order('created_at desc').limit(5)

-- 
Scott Ribe
[email protected]
http://www.elevated-dev.com/
(303) 722-0567 voice




-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to