From a7c9c83e02155f8e87c61e3712bf2f4f65f6e647 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 28 Apr 2019 02:12:54 +0300 Subject: [PATCH] redirect_to :back -> redirect_back --- .../management/call_for_participations_controller.rb | 4 ++-- app/controllers/management/conferences_controller.rb | 2 +- app/controllers/management/personal_profiles_controller.rb | 2 +- app/controllers/management/propositions_controller.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/management/call_for_participations_controller.rb b/app/controllers/management/call_for_participations_controller.rb index d7298f6..084f1fa 100644 --- a/app/controllers/management/call_for_participations_controller.rb +++ b/app/controllers/management/call_for_participations_controller.rb @@ -2,12 +2,12 @@ module Management class CallForParticipationsController < ManagementController def create current_conference.call_for_participation.open! - redirect_to :back + redirect_back fallback_location: [:management, current_conference] end def destroy current_conference.call_for_participation.close! - redirect_to :back + redirect_back fallback_location: [:management, current_conference] end end end diff --git a/app/controllers/management/conferences_controller.rb b/app/controllers/management/conferences_controller.rb index 8f15892..85b4b37 100644 --- a/app/controllers/management/conferences_controller.rb +++ b/app/controllers/management/conferences_controller.rb @@ -53,7 +53,7 @@ module Management else flash[:alert] = t('.error_during_vote_data_save') end - redirect_to :back + redirect_back fallback_location: [:management, @conference] rescue StandardError => e flash[:alert] = t('.error_during_connection_with_voting_endpoint', error: e.message) render :vote_results diff --git a/app/controllers/management/personal_profiles_controller.rb b/app/controllers/management/personal_profiles_controller.rb index 5bc4de6..110c14a 100644 --- a/app/controllers/management/personal_profiles_controller.rb +++ b/app/controllers/management/personal_profiles_controller.rb @@ -10,7 +10,7 @@ module Management @user = find_profile.user @user.toggle_admin! - redirect_to :back + redirect_back fallback_location: {action: :show} end def show diff --git a/app/controllers/management/propositions_controller.rb b/app/controllers/management/propositions_controller.rb index 67a7e00..a0eadf4 100644 --- a/app/controllers/management/propositions_controller.rb +++ b/app/controllers/management/propositions_controller.rb @@ -10,7 +10,7 @@ module Management @proposition.update(proposition_params) - redirect_to :back + redirect_back fallback_location: [:management, current_conference, @proposition] end private