1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

This commit is contained in:
José Valim 2010-09-24 12:54:31 +02:00
parent 672ce11d68
commit 6b3ad0cafc

View file

@ -88,7 +88,7 @@ module ActionController
raise RedirectBackError unless refer = request.headers["Referer"] raise RedirectBackError unless refer = request.headers["Referer"]
refer refer
when Proc when Proc
_compute_redirect_to_location instance_eval(&options) _compute_redirect_to_location options.call
else else
url_for(options) url_for(options)
end.gsub(/[\r\n]/, '') end.gsub(/[\r\n]/, '')