# How to paginate in descending order?

**URL:** <https://www.ruby-forum.com/t/how-to-paginate-in-descending-order/82548>\
**Category:** Rails\
**Created:** [March 16, 2006, 1:28pm UTC](https://www.ruby-forum.com/t/how-to-paginate-in-descending-order/82548 "2006-03-16T13:28:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [March 16, 2006, 1:28pm UTC](https://www.ruby-forum.com/t/how-to-paginate-in-descending-order/82548/1 "2006-03-16T13:28:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [March 16, 2006, 1:34pm UTC](https://www.ruby-forum.com/t/how-to-paginate-in-descending-order/82548/2 "2006-03-16T13:34:49Z")

</div>

:order =\> “created\_on DESC”

The key is the “DESC” piece.

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [March 16, 2006, 1:36pm UTC](https://www.ruby-forum.com/t/how-to-paginate-in-descending-order/82548/3 "2006-03-16T13:36:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e19b73/32.png) [@jeff](https://www.ruby-forum.com/u/jeff)\
**Post date:** [March 16, 2006, 2:42pm UTC](https://www.ruby-forum.com/t/how-to-paginate-in-descending-order/82548/4 "2006-03-16T14:42:24Z")

</div>

Not a problem - glad to help.
