Forum: Ruby on Rails Alpha sorting on both options and groups for option_groups_from_collection_for_select

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.
Tyler A. (Guest)
on 2009-04-03 10:28
(Received via mailing list)
# How would you best perform a secondary sort on :buildings below?
= 'Building Name'
= select_tag 'building_id', |
  option_groups_from_collection_for_select(Site.all(:order =>
:full_name), |
  :buildings, :full_name, :id, :full_name, nil) |


Tyler Arrigoni
President Network Engineering, Inc.
7475 North Palm, Suite 105, Fresno, CA 93711
Voice: 559-437-3750 ext. 110
Cell: 559-696-0400
Fax1: 866-691-5145 (confidential)
Fax2: 559-437-3754 (non-confidential)
Email: removed_email_address@domain.invalid
This topic is locked and can not be replied to.