Created
September 21, 2012 18:15
-
-
Save tetherit/3763041 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
.zone_selection | |
= grouped_collection_select(:event, :zone_id, @locations, :zones, :name, :id, :name, {:selected => "50463aa79438a08e45000037"}) | |
= params | |
# Generates the following HTML | |
<div class='zone_selection'> | |
<select id="event_zone_id" name="event[zone_id]"><optgroup label="Roman's Home"><option value="50463aa79438a08e45000001">Garden Side</option> | |
<option value="50463aa79438a08e4500000a">Doorbell</option> | |
<option value="50463aa79438a08e45000037">Entrance (Front)</option> | |
<option value="50463aa79438a08e4500000e">Garden Wide</option> | |
<option value="5058d28f9438a0f14f000062">Test Zone</option></optgroup><optgroup label="Roman's Car"><option value="505882249438a0f14f000039">Audi A4</option></optgroup></select> | |
</div> | |
# Why does the option with Entrance (Front) not have a selected=selected attribute? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment