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
on 2006-03-16 14:28
on 2006-03-16 14:34
:order => "created_on DESC" The key is the "DESC" piece.
on 2006-03-16 14:36
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
on 2006-03-16 15:42
Not a problem - glad to help.