Commit e53e6321 authored by 神楽坂玲奈's avatar 神楽坂玲奈

redirect_to :back 加入容错,可以通过直接访问/theme/lotus指定风格不报错

git-svn-id: http://glupx.googlecode.com/svn/trunk/Reliz@77 189f022a-1064-8ae2-3e6f-c4a67275c50b
parent 08ef59a8
...@@ -65,4 +65,12 @@ class ApplicationController < ActionController::Base ...@@ -65,4 +65,12 @@ class ApplicationController < ActionController::Base
#format.html { render :error => "404" } #format.html { render :error => "404" }
#end #end
#end #end
alias old_redirect_to redirect_to
def redirect_to(*args)
if args.first == :back and env['HTTP_REFERER'].blank?
old_redirect_to(:root)
else
old_redirect_to *args
end
end
end end
\ No newline at end of file
This diff is collapsed.
7668 6596
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment