redirect_to :back -> redirect_back

This commit is contained in:
Petko Bordjukov 2019-04-28 02:12:54 +03:00
parent eacc973cf2
commit a7c9c83e02
4 changed files with 5 additions and 5 deletions

View File

@ -2,12 +2,12 @@ module Management
class CallForParticipationsController < ManagementController class CallForParticipationsController < ManagementController
def create def create
current_conference.call_for_participation.open! current_conference.call_for_participation.open!
redirect_to :back redirect_back fallback_location: [:management, current_conference]
end end
def destroy def destroy
current_conference.call_for_participation.close! current_conference.call_for_participation.close!
redirect_to :back redirect_back fallback_location: [:management, current_conference]
end end
end end
end end

View File

@ -53,7 +53,7 @@ module Management
else else
flash[:alert] = t('.error_during_vote_data_save') flash[:alert] = t('.error_during_vote_data_save')
end end
redirect_to :back redirect_back fallback_location: [:management, @conference]
rescue StandardError => e 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 render :vote_results

View File

@ -10,7 +10,7 @@ module Management
@user = find_profile.user @user = find_profile.user
@user.toggle_admin! @user.toggle_admin!
redirect_to :back redirect_back fallback_location: {action: :show}
end end
def show def show

View File

@ -10,7 +10,7 @@ module Management
@proposition.update(proposition_params) @proposition.update(proposition_params)
redirect_to :back redirect_back fallback_location: [:management, current_conference, @proposition]
end end
private private