[Instantrails-users] Sorting..

Curt Hibbs curt.hibbs at gmail.com
Tue Jan 17 17:46:54 EST 2006

On 1/17/06, MaxSteel <maxsteel at gmail.com> wrote:
> Hey gurus!
> I've been playing with the cookbook app (as this was what i've been
> looking for for a while) and want to be able to SORT the lists.
> What is the simplest way to sort the output?
> for example in: http://www.mycookbook.com/recipe/list
> (Show all Recipes)
> How could I sort it by column one (recipe title), then by column two
> (recipe category)

This kind of queston is probably better asked on the Rails ML, but what you
want to do is something like this:

  receipes = Recipe.find( :all, :order => "title, category_id")

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/instantrails-users/attachments/20060117/e293a6ce/attachment.htm

More information about the Instantrails-users mailing list