Created
November 30, 2011 01:17
-
-
Save juanm55/1407508 to your computer and use it in GitHub Desktop.
a question regarding select tag in rails form helper...
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
<td>Project<br/ > | |
<%= f.select :project_id, Project.all.collect{|a| [a.name, a.id]}%></td> | |
# the idea would be to do something similar to what one can do with text_tag | |
<%= text_tag :comment, :size => 10 %> # which renders a text_input element,,, with 10 spaces for character input... | |
#I came to this problem because Project's names are quite long for what the default size of the select tag is... or do you know any other clever way of making the select tag be at least as long as the longest of the projects' name??? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment