Forum: Ruby on Rails How to specify Ascending or Descending Option?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
8c70506408fddb9740b4de7339055c77?d=identicon&s=25 Prashant Tiwari (tiwaripk)
on 2006-04-10 12:05
I am accessing records in Stores table as follows in @store object.
@store_pages, @stores = paginate :stores, :order_by => 'store_rating',
:per_page => 10
Now I want that records returned by above objects should be in
descending order. How to do this in above statement?

PLeaase help me.

429500a5a54600958c9c7ac032a37f66?d=identicon&s=25 Joe (Guest)
on 2006-04-10 12:16
:order_by => 'store_rating desc'

This topic is locked and can not be replied to.