redirect_to :back -> redirect_back
This commit is contained in:
parent
eacc973cf2
commit
a7c9c83e02
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue