jeff
1
How can I paginate a set of fields in descending order based on their
created_on date?
For example, in a blog app, you want the very first entry on the first
page to be the most recent.
I see that paginate has an :order parameter, but I don’t see any way of
changing the direction of the order.
Thanks,
Jeff C.man
jeff
2
:order => “created_on DESC”
The key is the “DESC” piece.
jeff
3
Michael G. wrote:
:order => “created_on DESC”
The key is the “DESC” piece.
Thanks! I’m a bit of a SQL new as well as ROR one
Jeff
jeff
4
Not a problem - glad to help.