Permalink
Browse files

Fix syntax error in redirect_to example

Without parenthesis, ruby assumes that curly braces denote the beginning
of a block.
  • Loading branch information...
fphilipe committed Dec 14, 2013
1 parent 068580d commit fd76b9d5469c3309ce4308fda5bc9e95cbc457f8
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/metal/redirecting.rb
@@ -58,7 +58,7 @@ module Redirecting
# redirect_to post_url(@post), alert: "Watch it, mister!"
# redirect_to post_url(@post), status: :found, notice: "Pay attention to the road"
# redirect_to post_url(@post), status: 301, flash: { updated_post_id: @post.id }
- # redirect_to { action: 'atom' }, alert: "Something serious happened"
+ # redirect_to({ action: 'atom' }, alert: "Something serious happened")
#
# When using <tt>redirect_to :back</tt>, if there is no referrer, ActionController::RedirectBackError will be raised. You may specify some fallback
# behavior for this case by rescuing ActionController::RedirectBackError.

0 comments on commit fd76b9d

Please sign in to comment.