[Rails] Using search_field as select
Hi,
I am trying to make the search_field look into a table of my database
which is different from the form's object's table.
Basically, I want to do this:
<td><%= f.search_field(:sport, Sport.all.collect {|s|[s.sport_name]})
%></td>
But it does not work obviously.
Sorry if this issue has already been raised but I did not find any
solution after searching on google and in this group posts.
Thank you in advance for your help,
Alex
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home