Rails select helper. How do I select the default value?
- by Ram
In Rails erb, am using the snippet to show visiting team in a tournament match. How do I get to initially show the current visiting_team? What am I doing wrong?
<%= f.select(:visiting_team_id, Team.all.collect{|t| [t.name, t.id] }) %>