With :limit in query, I will get first N records. What is the easiest way to get last N records?
:limit
This is the Rails 3 way
SomeModel.last(5) # last 5 records in ascending order SomeModel.last(5).reverse # last 5 records in descending order
1.4m articles
1.4m replys
5 comments
57.0k users