1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix syntax error in redirect_to example

Without parenthesis, ruby assumes that curly braces denote the beginning
of a block.
This commit is contained in:
Philipe Fatio 2013-12-14 15:35:50 +01:00
parent 068580d445
commit fd76b9d546

View file

@ -58,7 +58,7 @@ module ActionController
# 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.