Created
June 1, 2018 10:21
-
-
Save RemiDuvoux/aa53dd5610a12d850deca44a2e5db100 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
Using simple_form on a collection of Users. | |
I need the dropdown to show the name and surname of the Users (not only the name) + the id in value. | |
This works 👇 | |
<%= t.input :traveller, :collection => Proc.new{ @team_users.map{ |p| ["#{p.name} #{p.surname}", p.id] } }, label: false, selected: current_user.id %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment