From de5dd08b5599b96aa5d574c9bffd82075a76737f Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 29 Aug 2015 17:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E4=B9=8B=E5=90=8E=E8=B7=B3?= =?UTF-8?q?=E5=88=B0=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1c233ed6b..a6554075f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -563,7 +563,7 @@ class ApplicationController < ActionController::Base uri = URI.parse(back_url) # do not redirect user to another host or to the login or register page if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)}) - back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s) + back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s) if default.is_a?(:User) redirect_to(back_url) return end