mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 04:21:36 +00:00
fixed reactivating teams in a contest failed
This commit is contained in:
parent
9989e840aa
commit
b1e451030c
2 changed files with 3 additions and 3 deletions
|
@ -26,11 +26,11 @@ class ContestersController < ApplicationController
|
|||
@contester.score = @contester.contest.contesters.active.count + 1
|
||||
end
|
||||
|
||||
if @contester.save
|
||||
if @contester.save!
|
||||
flash[:notice] = t(:contests_join)
|
||||
redirect_to contest_path(@contester.contest_id)
|
||||
else
|
||||
flash[:error] = t(:errors) + @contester.errors.full_messages.to_s
|
||||
flash[:error] = @contester.errors.full_messages.to_s #t(:errors) + @contester.errors.full_messages.to_s
|
||||
redirect_to_back
|
||||
end
|
||||
end
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
<%= form_for contester do |c| %>
|
||||
<%= c.hidden_field :active, { value: 1 } %>
|
||||
<%= link_to icon('pencil'), edit_contester_path(contester) %>
|
||||
<%= link_to_function icon('rotate-left'), "$('edit_contester_#{contester.id}').submit()" %>
|
||||
<%= link_to_function icon('rotate-left'), "$('#edit_contester_#{contester.id}').submit()" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue