I am having trouble figuring out how to use a check box with a list of
I have two models, players and player_stats
I want to present a list of players, and use a check box to determine
if a player_stat should be created for that player. In my view I’m
trying to do something like this.
<% for @player in @players %>
I don’t know what to use as the method in the check_box() call. The
check box doesn’t specify an attribute in either model, I want it to
signify that a player_stat should be created.
Is there a better way to approach this? I want to show the user a list
of all players. The user will then select the players that played in a
game, and a row in player_stats will be created.