With :limit in query, I will get first N records. What is the easiest way to get last N records?
:limit
In my rails (rails 4.2) project, I use
(rails 4.2)
Model.last(10) # get the last 10 record order by id
and it works.