Fix exception handling in conferences controller
This commit is contained in:
parent
4870eff959
commit
fa879dcb5e
|
@ -28,3 +28,7 @@ select.date, select.datetime, select.time {
|
||||||
@extend .col-sm-offset-3;
|
@extend .col-sm-offset-3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.alert-error {
|
||||||
|
@extend .alert-danger;
|
||||||
|
}
|
||||||
|
|
|
@ -49,15 +49,15 @@ module Management
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if @conference.update_vote_data!
|
if @conference.update_vote_data!
|
||||||
flash[:notice] = t '.vote_data_successfully_updated'
|
flash[:notice] = t('.vote_data_successfully_updated')
|
||||||
else
|
else
|
||||||
flash[:alert] = t '.error_during_vote_data_save'
|
flash[:alert] = t('.error_during_vote_data_save')
|
||||||
end
|
end
|
||||||
rescue StandardError => e
|
|
||||||
flash[:alert] = t '.error_during_connection_with_voting_endpoint', error: e.message
|
|
||||||
end
|
|
||||||
|
|
||||||
redirect_to :back
|
redirect_to :back
|
||||||
|
rescue StandardError => e
|
||||||
|
flash[:alert] = t('.error_during_connection_with_voting_endpoint', error: e.message)
|
||||||
|
render :vote_results
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def vote_results
|
def vote_results
|
||||||
|
|
Loading…
Reference in New Issue