mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +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
|
@contester.score = @contester.contest.contesters.active.count + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if @contester.save
|
if @contester.save!
|
||||||
flash[:notice] = t(:contests_join)
|
flash[:notice] = t(:contests_join)
|
||||||
redirect_to contest_path(@contester.contest_id)
|
redirect_to contest_path(@contester.contest_id)
|
||||||
else
|
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
|
redirect_to_back
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
<%= form_for contester do |c| %>
|
<%= form_for contester do |c| %>
|
||||||
<%= c.hidden_field :active, { value: 1 } %>
|
<%= c.hidden_field :active, { value: 1 } %>
|
||||||
<%= link_to icon('pencil'), edit_contester_path(contester) %>
|
<%= 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 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in a new issue