Skip to content

Commit

Permalink
There is no need to use instance_eval since the proc is created in th…
Browse files Browse the repository at this point in the history
…e same context it is eval'ed.
  • Loading branch information
josevalim committed Sep 24, 2010
1 parent 672ce11 commit 6b3ad0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/redirecting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]/, '')
Expand Down

0 comments on commit 6b3ad0c

Please sign in to comment.