I have following data in database:
1
2
3
4
5
And I would like to get to output this:
3
4
5
I need it to print in the view:
<%car.colors.limit(3).order('created_at ASC').each do |color|%>
...
I know that exists reverse_order, but exist something like reverse sort?
(I know that is possible to load the data into an array and then go through the array, but this way is not very efficient)