diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb
index 44423f5..b4d345f 100644
--- a/app/controllers/matches_controller.rb
+++ b/app/controllers/matches_controller.rb
@@ -1,21 +1,12 @@
class MatchesController < ApplicationController
before_action :set_match, only: [:show, :edit, :update, :destroy]
before_action :check_access, only: [:edit,:update]
- # GET /matches
- # GET /matches.json
- def index
- @matches = Match.all
- end
# GET /matches/1
# GET /matches/1.json
def show
end
- # GET /matches/new
- def new
- @match = Match.new
- end
# GET /matches/1/edit
def edit
@@ -28,21 +19,6 @@ class MatchesController < ApplicationController
end
end
- # POST /matches
- # POST /matches.json
- def create
- @match = Match.new(match_params)
-
- respond_to do |format|
- if @match.save
- format.html { redirect_to @match, notice: 'Match was successfully created.' }
- format.json { render action: 'show', status: :created, location: @match }
- else
- format.html { render action: 'new' }
- format.json { render json: @match.errors, status: :unprocessable_entity }
- end
- end
- end
# PATCH/PUT /matches/1
# PATCH/PUT /matches/1.json
@@ -58,19 +34,6 @@ class MatchesController < ApplicationController
end
end
- # DELETE /matches/1
- # DELETE /matches/1.json
- def destroy
- if user_signed_in?
- else
- redirect_to root_path
- end
- @match.destroy
- respond_to do |format|
- format.html { redirect_to matches_url }
- format.json { head :no_content }
- end
- end
private
# Use callbacks to share common setup or constraints between actions.
diff --git a/app/controllers/mats_controller.rb b/app/controllers/mats_controller.rb
index c63ebea..5165910 100644
--- a/app/controllers/mats_controller.rb
+++ b/app/controllers/mats_controller.rb
@@ -1,11 +1,6 @@
class MatsController < ApplicationController
before_action :set_mat, only: [:show, :edit, :update, :destroy]
before_filter :check_access, only: [:new,:create,:update,:destroy]
- # GET /mats
- # GET /mats.json
- def index
- @mats = Mat.all
- end
# GET /mats/1
# GET /mats/1.json
diff --git a/app/controllers/schools_controller.rb b/app/controllers/schools_controller.rb
index 82f64ec..ef12390 100644
--- a/app/controllers/schools_controller.rb
+++ b/app/controllers/schools_controller.rb
@@ -2,11 +2,6 @@ class SchoolsController < ApplicationController
before_action :set_school, only: [:show, :edit, :update, :destroy]
before_filter :check_access, only: [:new,:create,:update,:destroy,:edit]
- # GET /schools
- # GET /schools.json
- def index
- @schools = School.all
- end
# GET /schools/1
# GET /schools/1.json
diff --git a/app/controllers/weights_controller.rb b/app/controllers/weights_controller.rb
index 62f78c2..e80ffc0 100644
--- a/app/controllers/weights_controller.rb
+++ b/app/controllers/weights_controller.rb
@@ -2,11 +2,6 @@ class WeightsController < ApplicationController
before_action :set_weight, only: [:show, :edit, :update, :destroy]
before_filter :check_access, only: [:new,:create,:update,:destroy]
- # GET /weights
- # GET /weights.json
- def index
- @weights = Weight.all
- end
# GET /weights/1
# GET /weights/1.json
diff --git a/app/controllers/wrestlers_controller.rb b/app/controllers/wrestlers_controller.rb
index 91b656b..1bb39cd 100644
--- a/app/controllers/wrestlers_controller.rb
+++ b/app/controllers/wrestlers_controller.rb
@@ -2,12 +2,6 @@ class WrestlersController < ApplicationController
before_action :set_wrestler, only: [:show, :edit, :update, :destroy]
before_filter :check_access, only: [:new,:create,:update,:destroy]
- # GET /wrestlers
- # GET /wrestlers.json
- def index
- @wrestlers = Wrestler.all
- @school = School.find(@wrestler.school_id)
- end
# GET /wrestlers/1
# GET /wrestlers/1.json
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb
deleted file mode 100644
index 661990c..0000000
--- a/app/views/matches/index.html.erb
+++ /dev/null
@@ -1,37 +0,0 @@
-
Listing matches
-
-
-
-
- | R |
- G |
- G stat |
- R stat |
- Winner |
- Win type |
- Score |
- |
- |
- |
-
-
-
-
- <% @matches.each do |match| %>
-
- | <%= match.w1_name %> |
- <%= match.w2_name %> |
- <%= match.winner_id %> |
- <%= match.win_type %> |
- <%= match.score %> |
- <%= link_to 'Show', match %> |
- <%= link_to 'Edit', edit_match_path(match) %> |
- <%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %> |
-
- <% end %>
-
-
-
-
-
-<%= link_to 'New Match', new_match_path %>
diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder
deleted file mode 100644
index 6e705cc..0000000
--- a/app/views/matches/index.json.jbuilder
+++ /dev/null
@@ -1,4 +0,0 @@
-json.array!(@matches) do |match|
- json.extract! match, :id, :r_id, :g_id, :g_stat, :r_stat, :winner_id, :win_type, :score
- json.url match_url(match, format: :json)
-end
diff --git a/app/views/matches/new.html.erb b/app/views/matches/new.html.erb
deleted file mode 100644
index bd4c78c..0000000
--- a/app/views/matches/new.html.erb
+++ /dev/null
@@ -1,5 +0,0 @@
-New match
-
-<%= render 'form' %>
-
-<%= link_to 'Back', matches_path %>
diff --git a/app/views/mats/index.html.erb b/app/views/mats/index.html.erb
deleted file mode 100644
index 13f4375..0000000
--- a/app/views/mats/index.html.erb
+++ /dev/null
@@ -1,29 +0,0 @@
-Listing mats
-
-
-
-
- | Name |
- Tournament |
- |
- |
- |
-
-
-
-
- <% @mats.each do |mat| %>
-
- | <%= mat.name %> |
- <%= mat.tournament_id %> |
- <%= link_to 'Show', mat %> |
- <%= link_to 'Edit', edit_mat_path(mat) %> |
- <%= link_to 'Destroy', mat, method: :delete, data: { confirm: 'Are you sure?' } %> |
-
- <% end %>
-
-
-
-
-
-<%= link_to 'New Mat', new_mat_path %>
diff --git a/app/views/mats/index.json.jbuilder b/app/views/mats/index.json.jbuilder
deleted file mode 100644
index a1d6780..0000000
--- a/app/views/mats/index.json.jbuilder
+++ /dev/null
@@ -1,4 +0,0 @@
-json.array!(@mats) do |mat|
- json.extract! mat, :id, :name, :tournament_id
- json.url mat_url(mat, format: :json)
-end
diff --git a/app/views/schools/index.html.erb b/app/views/schools/index.html.erb
deleted file mode 100644
index 76059e5..0000000
--- a/app/views/schools/index.html.erb
+++ /dev/null
@@ -1,25 +0,0 @@
-Listing schools
-
-
-
-
- | Name |
- Score |
- Actions |
-
-
-
-
- <% @schools.each do |school| %>
-
- | <%= school.name %> |
- <%= school.score %> |
- <%= link_to 'Show', school , :class=>"btn btn-default" %><%= link_to 'Edit', edit_school_path(school), :class=>"btn btn-default" %><%= link_to 'Destroy', school, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %> |
-
- <% end %>
-
-
-
-
-
-<%= link_to 'New School', new_school_path %>
diff --git a/app/views/schools/index.json.jbuilder b/app/views/schools/index.json.jbuilder
deleted file mode 100644
index 753c7c3..0000000
--- a/app/views/schools/index.json.jbuilder
+++ /dev/null
@@ -1,4 +0,0 @@
-json.array!(@schools) do |school|
- json.extract! school, :id, :name, :score
- json.url school_url(school, format: :json)
-end
diff --git a/app/views/weights/index.html.erb b/app/views/weights/index.html.erb
deleted file mode 100644
index adde78e..0000000
--- a/app/views/weights/index.html.erb
+++ /dev/null
@@ -1,23 +0,0 @@
-Listing weights
-
-
-
-
- | Max |
- Actions |
-
-
-
-
- <% @weights.each do |weight| %>
-
- | <%= weight.max %> |
- <%= link_to 'Show', weight, :class=>"btn btn-default" %><%= link_to 'Edit', edit_weight_path(weight), :class=>"btn btn-default" %><%= link_to 'Destroy', weight, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %> |
-
- <% end %>
-
-
-
-
-
-<%= link_to 'New Weight', new_weight_path %>
diff --git a/app/views/weights/index.json.jbuilder b/app/views/weights/index.json.jbuilder
deleted file mode 100644
index 608d638..0000000
--- a/app/views/weights/index.json.jbuilder
+++ /dev/null
@@ -1,4 +0,0 @@
-json.array!(@weights) do |weight|
- json.extract! weight, :id, :max
- json.url weight_url(weight, format: :json)
-end
diff --git a/app/views/wrestlers/index.html.erb b/app/views/wrestlers/index.html.erb
deleted file mode 100644
index 1f7a79d..0000000
--- a/app/views/wrestlers/index.html.erb
+++ /dev/null
@@ -1,29 +0,0 @@
-Listing wrestlers
-
-
-
-
- | Name |
- Weight |
- Seed |
- Original seed |
- Actions |
-
-
-
-
- <% @wrestlers.each do |wrestler| %>
-
- | <%= wrestler.name %> |
- <%= Weight.find(wrestler.weight_id).max %> |
- <%= wrestler.seed %> |
- <%= wrestler.original_seed %> |
- <%= link_to 'Show', wrestler , :class=>"btn btn-default" %><%= link_to 'Edit', edit_wrestler_path(wrestler), :class=>"btn btn-default" %><%= link_to 'Destroy', wrestler, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %> |
-
- <% end %>
-
-
-
-
-
-<%= link_to 'New Wrestler', new_wrestler_path %>
diff --git a/app/views/wrestlers/index.json.jbuilder b/app/views/wrestlers/index.json.jbuilder
deleted file mode 100644
index 601880b..0000000
--- a/app/views/wrestlers/index.json.jbuilder
+++ /dev/null
@@ -1,4 +0,0 @@
-json.array!(@wrestlers) do |wrestler|
- json.extract! wrestler, :id, :name, :school_id, :weight_id, :seed, :original_seed
- json.url wrestler_url(wrestler, format: :json)
-end