Created
May 14, 2009 04:56
-
-
Save thisivan/111492 to your computer and use it in GitHub Desktop.
Creating a collection_select with custom options (E.g. new company)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= form.collection_select :company_id, Company.all + | | |
[OpenStruct.new(:id => 'new', :name => 'New Company')], :id, :name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment