I believe in MySQL and PostgreSQL you can do something like this:

order by status in (1,4,5,6,2,3,8,9,7) asc

Which would translate to something like this in Rails:

:order => "status in (1,4,5,6,2,3,8,9,7) asc, messages.created_at desc"

Not sure if that will work verbatim though. You might have to play around 
with it a little bit.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/z8p1nOsd4nMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to