The ":selected" statement is not working. Ideas why? Similar experiences?
<%= start_form_tag :action => 'dummy' %> <% @teams = Team.find(:all) %> <label for="team_id">Team</label><br/> <%= collection_select("team", "id", @teams, :id, :name, { :include_blank => true, :selected => @teams[5].id }) %> <%= end_form_tag %>
It is generating the follwing code:
<form action="/games/dummy" method="post"> <label for="team_id">Team</label><br/> <select id="team_id" name="team[id]"><option value=""></option> <option value="1">Baltimore</option> <option value="2">Buffalo</option> <option value="3">Cincinnati</option> <option value="4">Cleveland</option> <option value="5">Denver</option> <option value="6">Houston</option> <option value="7">Indianapolis</option> <option value="8">Jacksonville</option> <option value="9">Kansas City</option>
... etc
</select>
</form>
Oddly, the option :for include_blank is working, while the selected right next to it is not.
Please help.