Fix exception handling in conferences controller

This commit is contained in:
Petko Bordjukov 2016-10-11 02:54:25 +03:00
parent 4870eff959
commit fa879dcb5e
2 changed files with 9 additions and 5 deletions

View File

@ -28,3 +28,7 @@ select.date, select.datetime, select.time {
@extend .col-sm-offset-3;
}
}
.alert-error {
@extend .alert-danger;
}

View File

@ -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