diff --git a/app/assets/stylesheets/management/_forms.scss b/app/assets/stylesheets/management/_forms.scss index d82e975..b347ca3 100644 --- a/app/assets/stylesheets/management/_forms.scss +++ b/app/assets/stylesheets/management/_forms.scss @@ -28,3 +28,7 @@ select.date, select.datetime, select.time { @extend .col-sm-offset-3; } } + +.alert-error { + @extend .alert-danger; +} diff --git a/app/controllers/management/conferences_controller.rb b/app/controllers/management/conferences_controller.rb index c5ed982..8f15892 100644 --- a/app/controllers/management/conferences_controller.rb +++ b/app/controllers/management/conferences_controller.rb @@ -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 + redirect_to :back rescue StandardError => e - flash[:alert] = t '.error_during_connection_with_voting_endpoint', error: e.message + flash[:alert] = t('.error_during_connection_with_voting_endpoint', error: e.message) + render :vote_results end - - redirect_to :back end def vote_results