Merge pull request #955 from sgmap/avoid_infinite_redirect_if_procedure_is_deleted

If user_return_to procedure is invalid then remove it from session
This commit is contained in:
gregoirenovel 2017-11-21 18:01:56 +01:00 committed by GitHub
commit d52726096c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,6 +69,7 @@ class Users::SessionsController < Sessions::SessionsController
private
def error_procedure
session["user_return_to"] = nil
flash.alert = t('errors.messages.procedure_not_found')
redirect_to url_for root_path
end