diff options
-rw-r--r-- | app/controllers/matches_controller.rb | 2 | ||||
-rw-r--r-- | app/views/matches/_form.html.erb | 8 | ||||
-rw-r--r-- | app/views/matches/index.html.erb | 4 | ||||
-rw-r--r-- | app/views/matches/index.json.jbuilder | 2 | ||||
-rw-r--r-- | app/views/matches/show.html.erb | 10 | ||||
-rw-r--r-- | app/views/matches/show.json.jbuilder | 2 | ||||
-rw-r--r-- | db/migrate/20140429034423_create_simple_captcha_data.rb (renamed from db/migrate/20140428183808_create_simple_captcha_data.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074419_create_mailboxer.mailboxer_engine.rb (renamed from db/migrate/20140428223805_create_mailboxer.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074420_add_notified_object.mailboxer_engine.rb (renamed from db/migrate/20140428223806_add_notified_object.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074421_add_notification_code.mailboxer_engine.rb (renamed from db/migrate/20140428223807_add_notification_code.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074422_add_attachments.mailboxer_engine.rb (renamed from db/migrate/20140428223808_add_attachments.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074423_rename_receipts_read.mailboxer_engine.rb (renamed from db/migrate/20140428223809_rename_receipts_read.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074424_add_global_notification_support.mailboxer_engine.rb (renamed from db/migrate/20140428223810_add_global_notification_support.mailboxer_engine.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074426_create_delayed_jobs.rb (renamed from db/migrate/20140428223812_create_delayed_jobs.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074430_create_servers.rb (renamed from db/migrate/20140428223815_create_servers.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074434_create_matches.rb (renamed from db/migrate/20140428223819_create_matches.rb) | 2 | ||||
-rw-r--r-- | db/migrate/20140429074437_create_teams.rb (renamed from db/migrate/20140428223823_create_teams.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074441_create_alerts.rb (renamed from db/migrate/20140428223827_create_alerts.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074445_create_pms.rb (renamed from db/migrate/20140428223830_create_pms.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074449_create_tournaments.rb (renamed from db/migrate/20140428223834_create_tournaments.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074453_create_games.rb (renamed from db/migrate/20140428223838_create_games.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074456_create_users.rb (renamed from db/migrate/20140428223842_create_users.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074500_create_sessions.rb (renamed from db/migrate/20140428223845_create_sessions.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074504_create_brackets.rb (renamed from db/migrate/20140428223849_create_brackets.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074508_create_game_settings.rb (renamed from db/migrate/20140428223853_create_game_settings.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074511_create_tournament_settings.rb (renamed from db/migrate/20140428223856_create_tournament_settings.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074515_create_tournament_stages.rb (renamed from db/migrate/20140428223900_create_tournament_stages.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074519_create_statistics.rb (renamed from db/migrate/20140428223903_create_statistics.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074522_create_remote_usernames.rb (renamed from db/migrate/20140428223907_create_remote_usernames.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074526_create_bracket_matches.rb (renamed from db/migrate/20140428223911_create_bracket_matches.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074530_create_api_requests.rb (renamed from db/migrate/20140428223914_create_api_requests.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074533_create_tournament_players_join_table.rb (renamed from db/migrate/20140428223918_create_tournament_players_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074537_create_tournament_hosts_join_table.rb (renamed from db/migrate/20140428223922_create_tournament_hosts_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074540_create_team_user_join_table.rb (renamed from db/migrate/20140428223925_create_team_user_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074544_create_match_team_join_table.rb (renamed from db/migrate/20140428223929_create_match_team_join_table.rb) | 0 | ||||
-rw-r--r-- | db/migrate/20140429074555_add_hidden_attrs_to_user.rb (renamed from db/migrate/20140428223939_add_hidden_attrs_to_user.rb) | 0 | ||||
-rw-r--r-- | db/schema.rb | 4 | ||||
-rw-r--r-- | test/controllers/matches_controller_test.rb | 4 | ||||
-rw-r--r-- | test/fixtures/matches.yml | 4 |
39 files changed, 6 insertions, 36 deletions
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index b1162ef..4042d3c 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -69,6 +69,6 @@ class MatchesController < ApplicationController # Never trust parameters from the scary internet, only allow the white list through. def match_params - params.require(:match).permit(:status, :tournament_stage_id, :winner_id, :remote_id, :submitted_peer_evaluations) + params.require(:match).permit(:status, :tournament_stage_id, :winner_id) end end diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index 9e09fd8..768b655 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -23,14 +23,6 @@ <%= f.label :winner_id %><br> <%= f.text_field :winner_id %> </div> - <div class="field"> - <%= f.label :remote_id %><br> - <%= f.text_area :remote_id %> - </div> - <div class="field"> - <%= f.label :submitted_peer_evaluations %><br> - <%= f.number_field :submitted_peer_evaluations %> - </div> <div class="actions"> <%= f.submit %> </div> diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 766c3e8..85c94f2 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -6,8 +6,6 @@ <th>Status</th> <th>Tournament stage</th> <th>Winner</th> - <th>Remote</th> - <th>Submitted peer evaluations</th> <th></th> <th></th> <th></th> @@ -20,8 +18,6 @@ <td><%= match.status %></td> <td><%= match.tournament_stage %></td> <td><%= match.winner %></td> - <td><%= match.remote_id %></td> - <td><%= match.submitted_peer_evaluations %></td> <td><%= link_to 'Show', match %></td> <td><%= link_to 'Edit', edit_match_path(match) %></td> <td><%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %></td> diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder index bef149d..d5a97fe 100644 --- a/app/views/matches/index.json.jbuilder +++ b/app/views/matches/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@matches) do |match| - json.extract! match, :id, :status, :tournament_stage_id, :winner_id, :remote_id, :submitted_peer_evaluations + json.extract! match, :id, :status, :tournament_stage_id, :winner_id json.url match_url(match, format: :json) end diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 8384ff2..b47a045 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -15,15 +15,5 @@ <%= @match.winner %> </p> -<p> - <strong>Remote:</strong> - <%= @match.remote_id %> -</p> - -<p> - <strong>Submitted peer evaluations:</strong> - <%= @match.submitted_peer_evaluations %> -</p> - <%= link_to 'Edit', edit_match_path(@match) %> | <%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder index 145f069..dd2cde3 100644 --- a/app/views/matches/show.json.jbuilder +++ b/app/views/matches/show.json.jbuilder @@ -1 +1 @@ -json.extract! @match, :id, :status, :tournament_stage_id, :winner_id, :remote_id, :submitted_peer_evaluations, :created_at, :updated_at +json.extract! @match, :id, :status, :tournament_stage_id, :winner_id, :created_at, :updated_at diff --git a/db/migrate/20140428183808_create_simple_captcha_data.rb b/db/migrate/20140429034423_create_simple_captcha_data.rb index 4573b20..4573b20 100644 --- a/db/migrate/20140428183808_create_simple_captcha_data.rb +++ b/db/migrate/20140429034423_create_simple_captcha_data.rb diff --git a/db/migrate/20140428223805_create_mailboxer.mailboxer_engine.rb b/db/migrate/20140429074419_create_mailboxer.mailboxer_engine.rb index 690cec2..690cec2 100644 --- a/db/migrate/20140428223805_create_mailboxer.mailboxer_engine.rb +++ b/db/migrate/20140429074419_create_mailboxer.mailboxer_engine.rb diff --git a/db/migrate/20140428223806_add_notified_object.mailboxer_engine.rb b/db/migrate/20140429074420_add_notified_object.mailboxer_engine.rb index 7f41ac6..7f41ac6 100644 --- a/db/migrate/20140428223806_add_notified_object.mailboxer_engine.rb +++ b/db/migrate/20140429074420_add_notified_object.mailboxer_engine.rb diff --git a/db/migrate/20140428223807_add_notification_code.mailboxer_engine.rb b/db/migrate/20140429074421_add_notification_code.mailboxer_engine.rb index 04c12ef..04c12ef 100644 --- a/db/migrate/20140428223807_add_notification_code.mailboxer_engine.rb +++ b/db/migrate/20140429074421_add_notification_code.mailboxer_engine.rb diff --git a/db/migrate/20140428223808_add_attachments.mailboxer_engine.rb b/db/migrate/20140429074422_add_attachments.mailboxer_engine.rb index b8d6588..b8d6588 100644 --- a/db/migrate/20140428223808_add_attachments.mailboxer_engine.rb +++ b/db/migrate/20140429074422_add_attachments.mailboxer_engine.rb diff --git a/db/migrate/20140428223809_rename_receipts_read.mailboxer_engine.rb b/db/migrate/20140429074423_rename_receipts_read.mailboxer_engine.rb index 9ce904f..9ce904f 100644 --- a/db/migrate/20140428223809_rename_receipts_read.mailboxer_engine.rb +++ b/db/migrate/20140429074423_rename_receipts_read.mailboxer_engine.rb diff --git a/db/migrate/20140428223810_add_global_notification_support.mailboxer_engine.rb b/db/migrate/20140429074424_add_global_notification_support.mailboxer_engine.rb index 60f67ab..60f67ab 100644 --- a/db/migrate/20140428223810_add_global_notification_support.mailboxer_engine.rb +++ b/db/migrate/20140429074424_add_global_notification_support.mailboxer_engine.rb diff --git a/db/migrate/20140428223812_create_delayed_jobs.rb b/db/migrate/20140429074426_create_delayed_jobs.rb index ec0dd93..ec0dd93 100644 --- a/db/migrate/20140428223812_create_delayed_jobs.rb +++ b/db/migrate/20140429074426_create_delayed_jobs.rb diff --git a/db/migrate/20140428223815_create_servers.rb b/db/migrate/20140429074430_create_servers.rb index fbe1b02..fbe1b02 100644 --- a/db/migrate/20140428223815_create_servers.rb +++ b/db/migrate/20140429074430_create_servers.rb diff --git a/db/migrate/20140428223819_create_matches.rb b/db/migrate/20140429074434_create_matches.rb index bac92d1..d80db5f 100644 --- a/db/migrate/20140428223819_create_matches.rb +++ b/db/migrate/20140429074434_create_matches.rb @@ -4,8 +4,6 @@ class CreateMatches < ActiveRecord::Migration t.integer :status t.references :tournament_stage, index: true t.references :winner, index: true - t.text :remote_id - t.integer :submitted_peer_evaluations t.timestamps end diff --git a/db/migrate/20140428223823_create_teams.rb b/db/migrate/20140429074437_create_teams.rb index dd8397d..dd8397d 100644 --- a/db/migrate/20140428223823_create_teams.rb +++ b/db/migrate/20140429074437_create_teams.rb diff --git a/db/migrate/20140428223827_create_alerts.rb b/db/migrate/20140429074441_create_alerts.rb index 68a8e10..68a8e10 100644 --- a/db/migrate/20140428223827_create_alerts.rb +++ b/db/migrate/20140429074441_create_alerts.rb diff --git a/db/migrate/20140428223830_create_pms.rb b/db/migrate/20140429074445_create_pms.rb index eb9f443..eb9f443 100644 --- a/db/migrate/20140428223830_create_pms.rb +++ b/db/migrate/20140429074445_create_pms.rb diff --git a/db/migrate/20140428223834_create_tournaments.rb b/db/migrate/20140429074449_create_tournaments.rb index f3715bb..f3715bb 100644 --- a/db/migrate/20140428223834_create_tournaments.rb +++ b/db/migrate/20140429074449_create_tournaments.rb diff --git a/db/migrate/20140428223838_create_games.rb b/db/migrate/20140429074453_create_games.rb index e841667..e841667 100644 --- a/db/migrate/20140428223838_create_games.rb +++ b/db/migrate/20140429074453_create_games.rb diff --git a/db/migrate/20140428223842_create_users.rb b/db/migrate/20140429074456_create_users.rb index 8032870..8032870 100644 --- a/db/migrate/20140428223842_create_users.rb +++ b/db/migrate/20140429074456_create_users.rb diff --git a/db/migrate/20140428223845_create_sessions.rb b/db/migrate/20140429074500_create_sessions.rb index f667f1e..f667f1e 100644 --- a/db/migrate/20140428223845_create_sessions.rb +++ b/db/migrate/20140429074500_create_sessions.rb diff --git a/db/migrate/20140428223849_create_brackets.rb b/db/migrate/20140429074504_create_brackets.rb index 8813bf2..8813bf2 100644 --- a/db/migrate/20140428223849_create_brackets.rb +++ b/db/migrate/20140429074504_create_brackets.rb diff --git a/db/migrate/20140428223853_create_game_settings.rb b/db/migrate/20140429074508_create_game_settings.rb index 06fb72e..06fb72e 100644 --- a/db/migrate/20140428223853_create_game_settings.rb +++ b/db/migrate/20140429074508_create_game_settings.rb diff --git a/db/migrate/20140428223856_create_tournament_settings.rb b/db/migrate/20140429074511_create_tournament_settings.rb index e56697f..e56697f 100644 --- a/db/migrate/20140428223856_create_tournament_settings.rb +++ b/db/migrate/20140429074511_create_tournament_settings.rb diff --git a/db/migrate/20140428223900_create_tournament_stages.rb b/db/migrate/20140429074515_create_tournament_stages.rb index 6e52bf0..6e52bf0 100644 --- a/db/migrate/20140428223900_create_tournament_stages.rb +++ b/db/migrate/20140429074515_create_tournament_stages.rb diff --git a/db/migrate/20140428223903_create_statistics.rb b/db/migrate/20140429074519_create_statistics.rb index 09a435f..09a435f 100644 --- a/db/migrate/20140428223903_create_statistics.rb +++ b/db/migrate/20140429074519_create_statistics.rb diff --git a/db/migrate/20140428223907_create_remote_usernames.rb b/db/migrate/20140429074522_create_remote_usernames.rb index e265985..e265985 100644 --- a/db/migrate/20140428223907_create_remote_usernames.rb +++ b/db/migrate/20140429074522_create_remote_usernames.rb diff --git a/db/migrate/20140428223911_create_bracket_matches.rb b/db/migrate/20140429074526_create_bracket_matches.rb index 3323e31..3323e31 100644 --- a/db/migrate/20140428223911_create_bracket_matches.rb +++ b/db/migrate/20140429074526_create_bracket_matches.rb diff --git a/db/migrate/20140428223914_create_api_requests.rb b/db/migrate/20140429074530_create_api_requests.rb index 544c330..544c330 100644 --- a/db/migrate/20140428223914_create_api_requests.rb +++ b/db/migrate/20140429074530_create_api_requests.rb diff --git a/db/migrate/20140428223918_create_tournament_players_join_table.rb b/db/migrate/20140429074533_create_tournament_players_join_table.rb index be240e8..be240e8 100644 --- a/db/migrate/20140428223918_create_tournament_players_join_table.rb +++ b/db/migrate/20140429074533_create_tournament_players_join_table.rb diff --git a/db/migrate/20140428223922_create_tournament_hosts_join_table.rb b/db/migrate/20140429074537_create_tournament_hosts_join_table.rb index 7521d89..7521d89 100644 --- a/db/migrate/20140428223922_create_tournament_hosts_join_table.rb +++ b/db/migrate/20140429074537_create_tournament_hosts_join_table.rb diff --git a/db/migrate/20140428223925_create_team_user_join_table.rb b/db/migrate/20140429074540_create_team_user_join_table.rb index f3b57fc..f3b57fc 100644 --- a/db/migrate/20140428223925_create_team_user_join_table.rb +++ b/db/migrate/20140429074540_create_team_user_join_table.rb diff --git a/db/migrate/20140428223929_create_match_team_join_table.rb b/db/migrate/20140429074544_create_match_team_join_table.rb index c2ed1b7..c2ed1b7 100644 --- a/db/migrate/20140428223929_create_match_team_join_table.rb +++ b/db/migrate/20140429074544_create_match_team_join_table.rb diff --git a/db/migrate/20140428223939_add_hidden_attrs_to_user.rb b/db/migrate/20140429074555_add_hidden_attrs_to_user.rb index 9b5c505..9b5c505 100644 --- a/db/migrate/20140428223939_add_hidden_attrs_to_user.rb +++ b/db/migrate/20140429074555_add_hidden_attrs_to_user.rb diff --git a/db/schema.rb b/db/schema.rb index c5032fa..1186a7f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140428223939) do +ActiveRecord::Schema.define(version: 20140429074555) do create_table "alerts", force: true do |t| t.integer "author_id" @@ -111,8 +111,6 @@ ActiveRecord::Schema.define(version: 20140428223939) do t.integer "status" t.integer "tournament_stage_id" t.integer "winner_id" - t.text "remote_id" - t.integer "submitted_peer_evaluations" t.datetime "created_at" t.datetime "updated_at" end diff --git a/test/controllers/matches_controller_test.rb b/test/controllers/matches_controller_test.rb index d4ac1ed..69cbff5 100644 --- a/test/controllers/matches_controller_test.rb +++ b/test/controllers/matches_controller_test.rb @@ -18,7 +18,7 @@ class MatchesControllerTest < ActionController::TestCase test "should create match" do assert_difference('Match.count') do - post :create, match: { remote_id: @match.remote_id, status: @match.status, submitted_peer_evaluations: @match.submitted_peer_evaluations, tournament_stage_id: @match.tournament_stage_id, winner_id: @match.winner_id } + post :create, match: { status: @match.status, tournament_stage_id: @match.tournament_stage_id, winner_id: @match.winner_id } end assert_redirected_to match_path(assigns(:match)) @@ -35,7 +35,7 @@ class MatchesControllerTest < ActionController::TestCase end test "should update match" do - patch :update, id: @match, match: { remote_id: @match.remote_id, status: @match.status, submitted_peer_evaluations: @match.submitted_peer_evaluations, tournament_stage_id: @match.tournament_stage_id, winner_id: @match.winner_id } + patch :update, id: @match, match: { status: @match.status, tournament_stage_id: @match.tournament_stage_id, winner_id: @match.winner_id } assert_redirected_to match_path(assigns(:match)) end diff --git a/test/fixtures/matches.yml b/test/fixtures/matches.yml index 4213238..2a995c7 100644 --- a/test/fixtures/matches.yml +++ b/test/fixtures/matches.yml @@ -4,12 +4,8 @@ one: status: 1 tournament_stage_id: winner_id: - remote_id: MyText - submitted_peer_evaluations: 1 two: status: 1 tournament_stage_id: winner_id: - remote_id: MyText - submitted_peer_evaluations: 1 |