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

View File

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

View File

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

View File

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