Created
April 13, 2010 21:43
-
-
Save csanz/365123 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| This is what I have | |
| <%= select(:user, :goalstext, Bodytarget.all.collect {|b| [ b.name, b.id ] }, {"class", "test"}, :class => "selected", :class => "selected") %> | |
| And it generates this | |
| <select class="selected" id="user_goalstext" name="user[goalstext]"> | |
| <option value="1">calves</option> | |
| <option value="2">back</option> | |
| <option value="3">upper-body</option> | |
| <option value="4">quads</option> | |
| <option value="5">biceps</option> | |
| </select> | |
| BUT what I need is this (See the class inside options tag) | |
| <select class="selected" id="user_goalstext" name="user[goalstext]"> | |
| <option value="1" class="selected">calves</option> | |
| <option value="2" class="selected">back</option> | |
| <option value="3" class="selected">upper-body</option> | |
| <option value="4" class="selected">quads</option> | |
| <option value="5" class="selected">biceps</option> | |
| </select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment