summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguntasgrewal <guntasgrewal@gmail.com>2014-04-28 19:47:48 -0400
committerguntasgrewal <guntasgrewal@gmail.com>2014-04-28 19:47:48 -0400
commit1288b00d612d5969bfdde5b572cb7b6004b0cb66 (patch)
tree8248b1f8bbf7fc462939b711f3dab2e875535eae
parentc082d76825cfc5d42a4eb285c88afa5dd3bd9fe5 (diff)
Fixed multiple redirection error.
-rw-r--r--app/assets/stylesheets/application/scaffolds.css.scss12
-rw-r--r--app/controllers/matches_controller.rb5
2 files changed, 9 insertions, 8 deletions
diff --git a/app/assets/stylesheets/application/scaffolds.css.scss b/app/assets/stylesheets/application/scaffolds.css.scss
index ae26907..cbe83bf 100644
--- a/app/assets/stylesheets/application/scaffolds.css.scss
+++ b/app/assets/stylesheets/application/scaffolds.css.scss
@@ -39,9 +39,6 @@ html {
form.search {
@extend .navbar-form;
float: right;
- input[type="submit"] {
- @extend .btn-warning;
- }
input[type="text"], input[type="search"] {
background-color: #303030;
border: 2px solid #ED9C28;
@@ -51,6 +48,9 @@ html {
height: 30px;
padding: 0px 5px;
}
+ input[type="submit"] {
+ @extend .btn-warning;
+ }
}
}
@@ -77,7 +77,7 @@ html {
clear: both;
border-top: solid 1px $orange;
text-align: center;
- margin: 0 auto;
+ margin: 1em auto 0;
width: 90%;
}
}
@@ -144,7 +144,7 @@ input, textarea{
border: 3px inset #A5A5A5;
padding: 8px;
- color: $orange !important;
+ color: $orange;
background: rgba(0,0,0,0.5);
margin: 0 0 5px 0;
}
@@ -153,7 +153,7 @@ select {
background-color: #333;
padding: 5px;
border: none;
- color: $orange !important;
+ color: $orange;
}
pre {
diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb
index 5745ac9..81ffcd8 100644
--- a/app/controllers/matches_controller.rb
+++ b/app/controllers/matches_controller.rb
@@ -44,7 +44,7 @@ class MatchesController < ApplicationController
end
when 2
# Started, waiting to finish
- @match.handle_sampling(params)
+ @match.handle_sampling(@current_user, params)
# The @match.status will be updated by Statistic's after_save hook
respond_to do |format|
format.html { redirect_to tournament_match_path(@tournament, @match), notice: 'Match has finished.' }
@@ -69,8 +69,9 @@ class MatchesController < ApplicationController
end
return
end
+ else
+ redirect_to tournament_match_path(@tournament, @match)
end
- redirect_to tournament_match_path(@tournament, @match)
end
private