Created
February 20, 2020 19:23
-
-
Save juan-fdz-hawa/03dc8d35b56dc40cc16baf939a0a5b7e to your computer and use it in GitHub Desktop.
This file contains 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
<%= f.input :author, | |
:as => :grouped_select, | |
:collection => [['Authors', ['Jose', 'Carlos']], ['General', ['Bob', 'John']]], | |
:group_method => :last %> | |
<%= f.input :author, | |
:as => :grouped_select, | |
:collection => Proc.new { [['Authors', ['Jose', 'Carlos']], ['General', ['Bob', 'John']]] }, | |
:group_method => :last %> | |
<%= f.input :author, | |
:as => :grouped_select, | |
:collection => { ['Jose', 'Carlos'] => 'Authors' }, | |
:group_method => :first, | |
:group_label_method => :last %> | |
<%= f.input :author, | |
:as => :grouped_select, | |
:collection => { 'Authors' => ['Jose', 'Carlos'] }, | |
:group_method => :last, | |
:label_method => :upcase, | |
:value_method => :downcase %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment