提交 6b3ad0ca 编写于 作者: J José Valim

There is no need to use instance_eval since the proc is created in the same context it is eval'ed.

上级 672ce11d
......@@ -88,7 +88,7 @@ def _compute_redirect_to_location(options)
raise RedirectBackError unless refer = request.headers["Referer"]
refer
when Proc
_compute_redirect_to_location instance_eval(&options)
_compute_redirect_to_location options.call
else
url_for(options)
end.gsub(/[\r\n]/, '')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册