Created
May 18, 2011 18:00
-
-
Save linusthe3rd/979123 to your computer and use it in GitHub Desktop.
Rails - Create a select tag for grades K-12
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.label :grade %> | |
<%= f.select(:grade, (["K"] | (1..12).to_a))%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The union operator ("|") combines the two arrays through a union on the two sets.