How do I Sorting Options

I am using options_from_collection_for_select to pull from a DB.
How do I sort the result set that comes up??

Blessed Be

Phillip

Robert W. wrote:

Have you tried ordering the collection pulled from the DB before
creating you options?

Example:
Person.find(:all, :conditions => [ “user_name = ?”, user_name], :order
=> “created_on”)

Thanks plugging that into the controller worked great.

Blessed Be

Phillip

Have you tried ordering the collection pulled from the DB before
creating you options?

Example:
Person.find(:all, :conditions => [ “user_name = ?”, user_name], :order
=> “created_on”)

On May 16, 11:36 am, Phillip B. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs