Skip to content

Commit

Permalink
Fix syntax error in redirect_to example
Browse files Browse the repository at this point in the history
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 fd76b9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/redirecting.rb
Expand Up @@ -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.
Expand Down

0 comments on commit fd76b9d

Please sign in to comment.