In my app, a user has_many resolutions, and i want @user.resolutions to
return only the most recently updated five resolutions, but ordered
oldest first out of those five.
So, let’s say i have 12 records, which we’ll label 1 through to 12. For
simplicity’s sake let’s say that the order of updated_at matches the
order of the labels. Then,
has_many :resolutions, :order => “id DESC”, :limit => 5
gives me [12,11,10,9,8]
This is the most recent five, but i want them ordered the other way,
ie
[8,9,10,11,12]
How do i do this in the has_many method call?
thanks
max