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

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.
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) |

--
Thanks,

Tyler Arrigoni
President

OneInterface.net 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
GnuPG: http://www.oneinterface.net/crypt/tyler.asc
This topic is locked and can not be replied to.