Skip to content

Commit

Permalink
チーム制限
Browse files Browse the repository at this point in the history
  • Loading branch information
otiai10 committed Mar 2, 2013
1 parent 5c65ace commit dcbeb4b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/newplayer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<dl class="dl-horizontal">
<dt class="newplayer">氏名</dt><dd><%= f.text_field :name %></dd>
<dt class="newplayer">かな</dt><dd><%= f.text_field :kana %></dd>
<dt class="newplayer">所属チーム</dt><dd><%= f.text_field :team %></dd>
<dt class="newplayer">所属チーム</dt><dd><%= f.select :team, TEAMS_FORM %></dd>
<dt class="newplayer">背番号</dt><dd><%= f.select :number, (1..99).to_a %></dd>
<dt class="newplayer">ポジション</dt><dd><%= f.select :position, POSITIONS_FORM %></dd>
<dt class="newplayer">学年</dt><dd><%= f.select :grade, GRADES_FORM %></dd>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/players.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<dl class="dl-horizontal">
<dt>氏名</dt><dd><%= f.text_field :name %></dd>
<dt>かな</dt><dd><%= f.text_field :kana %></dd>
<dt>所属チーム</dt><dd><%= f.text_field :team %></dd>
<dt>所属チーム</dt><dd><%= f.select :team, TEAMS_FORM %></dd>
<dt>背番号</dt><dd><%= f.select :number, (1..99).to_a %></dd>
<dt>ポジション</dt><dd><%= f.select :position, POSITIONS_FORM %></dd>
<dt>学年</dt><dd><%= f.select :grade, GRADES_FORM %></dd>
Expand Down
5 changes: 5 additions & 0 deletions config/initializers/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@
'群馬' => 10,
'埼玉' => 11
}

TEAMS_FORM = {
'gangsters' => 'gangsters',
'wildrover' => 'wildrover'
}

0 comments on commit dcbeb4b

Please sign in to comment.