diff --git a/actionpack/lib/action_controller/metal/redirecting.rb b/actionpack/lib/action_controller/metal/redirecting.rb index fb50fcae16a1ed25da5dd92fab38b656f8a24f12..55c650df6cab1c84cbea3e8d4e8d40bba422ec35 100644 --- a/actionpack/lib/action_controller/metal/redirecting.rb +++ b/actionpack/lib/action_controller/metal/redirecting.rb @@ -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]/, '')