app/controllers/workarea/admin/impersonations_controller.rb in workarea-admin-3.5.21 vs app/controllers/workarea/admin/impersonations_controller.rb in workarea-admin-3.5.22

- old
+ new

@@ -25,10 +25,11 @@ previous_user_id = session[:user_id] stop_impersonation clear_current_order flash[:success] = t('workarea.admin.users.flash_messages.stopped') - redirect_back_or(user_path(previous_user_id)) + referrer = URI.parse(request.referrer).request_uri rescue nil + redirect_back_or(referrer.presence || user_path(previous_user_id)) end end end end