Fix a double render while confirming proposals

This commit is contained in:
Henne Vogelsang 2014-09-01 18:28:07 +02:00
parent 89440b971d
commit 42159617b4

View file

@ -115,10 +115,11 @@ class ProposalController < ApplicationController
if @conference.user_registered?(current_user) if @conference.user_registered?(current_user)
redirect_to(conference_proposal_index_path(@conference.short_title), redirect_to(conference_proposal_index_path(@conference.short_title),
notice: 'The proposal was confirmed.') notice: 'The proposal was confirmed.')
end else
redirect_to(new_conference_conference_registrations_path(conference_id: @conference.short_title), redirect_to(new_conference_conference_registrations_path(conference_id: @conference.short_title),
alert: 'The proposal was confirmed. Please register to attend the conference.') alert: 'The proposal was confirmed. Please register to attend the conference.')
end end
end
def restart def restart
authorize! :update, @event authorize! :update, @event