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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Prashant T. (Guest)
on 2006-04-10 14:05
Hi,
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.

Thanx
Prash
Joe (Guest)
on 2006-04-10 14:16
:order_by => 'store_rating desc'

Joe
This topic is locked and can not be replied to.