1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-06 14:36:59 +00:00

Removed weight mat association

This commit is contained in:
Jacob Cody Wimer
2014-01-30 10:38:50 -05:00
parent eb5068f1b6
commit a3e1573c51
6 changed files with 7 additions and 12 deletions

View File

@@ -21,7 +21,6 @@ class WeightsController < ApplicationController
@tournament_field = params[:tournament]
@tournament = Tournament.find(params[:tournament])
end
@mats = Mat.where(tournament_id: @tournament.id)
end
# GET /weights/1/edit

View File

@@ -1,4 +1,3 @@
class Mat < ActiveRecord::Base
belongs_to :tournament
has_many :weights, dependent: :destroy
end

View File

@@ -1,7 +1,7 @@
<%= link_to "Back to #{@tournament.name} weights", "/static_pages/weights?tournament=#{@tournament.id}" %>
<br>
<br>
<h1><%= @weight.max %> lbs Bracket <%= Mat.find(@weight.mat_id).name %></h1>
<h1><%= @weight.max %> lbs Bracket</h1>
<% if @bracket_size == 10 %>
<%= render 'man10' %>
<% elsif @bracket_size == 9 %>

View File

@@ -24,13 +24,6 @@
<%= f.collection_select :tournament_id, Tournament.all, :id, :name %>
</div>
<% end %>
<div class="field">
<%= f.label 'Assigned Mat' %><br>
<%= f.collection_select :mat_id, @mats, :id, :name %>
</div>
<div class="actions">
<%= f.submit %>