Displaying 2 results from an estimated 2 matches for "match_team".
Did you mean:
match_teams
2006 Feb 05
0
Question about re-using entry form when a validation error occurs
...quot; pages (originally created by a
scaffold.)
In my form, I have several popups that I have to populate, and if on
the Edit page, selects the appropriate entry.
To build the popup menus, I''m using:
<%= options_from_collection_for_select(@teams, "id", "number",
@match_teams[0]) %>
@teams is set in the controller New method:
@teams = Team.find(:all, :order => "number")
and I have to set @match_teams to "".
In the Edit method, I again have to set the @teams variable (no
problem), and I then set the @match_teams array like:
@match_tea...
2006 Jan 31
1
Updating :has_many - :through related items
...cludes:
<select name="Red[]" id="red1">
<%= "<option value=""0"">Red 1</option>" if controller.action_name == ''new'' %>
<%= options_from_collection_for_select(@teams, "id", "number",
@match_teams[0]) %>
</select>
<select name="Red[]" id="red2">
<%= "<option value=""0"">Red 2</option>" if controller.action_name == ''new'' %>
<%= options_from_collection_for_select(@teams, "id", &...