Skip to content
Browse files

There is no need to use instance_eval since the proc is created in th…

…e same context it is eval'ed.
  • Loading branch information...
1 parent 672ce11 commit 6b3ad0cafc4203b0a171ac3c8be24e1c4402e150 @josevalim josevalim committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/metal/redirecting.rb
View
2 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]/, '')

0 comments on commit 6b3ad0c

Please sign in to comment.
Something went wrong with that request. Please try again.