Be more explicit with the impersonate return URL

This commit is contained in:
Andrew Tomaka 2015-12-02 13:21:07 -05:00
parent daca985a6e
commit ec754d2213

View file

@ -11,7 +11,7 @@ class Admin::ImpersonationController < Admin::ApplicationController
redirect_to admin_user_path(@user)
else
session[:impersonator_id] = current_user.username
session[:impersonator_return_to] = request.env['HTTP_REFERER']
session[:impersonator_return_to] = admin_user_path(@user)
warden.set_user(user, scope: 'user')