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;
|
||||
}
|
||||
}
|
||||
|
||||
.alert-error {
|
||||
@extend .alert-danger;
|
||||
}
|
||||
|
|
|
@ -49,15 +49,15 @@ module Management
|
|||
|
||||
begin
|
||||
if @conference.update_vote_data!
|
||||
flash[:notice] = t '.vote_data_successfully_updated'
|
||||
flash[:notice] = t('.vote_data_successfully_updated')
|
||||
else
|
||||
flash[:alert] = t '.error_during_vote_data_save'
|
||||
flash[:alert] = t('.error_during_vote_data_save')
|
||||
end
|
||||
rescue StandardError => e
|
||||
flash[:alert] = t '.error_during_connection_with_voting_endpoint', error: e.message
|
||||
end
|
||||
|
||||
redirect_to :back
|
||||
rescue StandardError => e
|
||||
flash[:alert] = t('.error_during_connection_with_voting_endpoint', error: e.message)
|
||||
render :vote_results
|
||||
end
|
||||
end
|
||||
|
||||
def vote_results
|
||||
|
|
Loading…
Reference in New Issue