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:
@@ -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
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
class Mat < ActiveRecord::Base
|
||||
belongs_to :tournament
|
||||
has_many :weights, dependent: :destroy
|
||||
end
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user