diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-04-17 15:57:38 +0200 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-04-17 15:57:38 +0200 |
commit | 5bdf50dbccf65cc4b6a50fe44a98318e9b433b1f (patch) | |
tree | 320979c99547f9de4e6b63f8a2523a07458eb1a9 /actionpack/lib/action_dispatch | |
parent | 8d2487d9d458914bebb83fc74a6957f56dc0a8b5 (diff) | |
download | rails-5bdf50dbccf65cc4b6a50fe44a98318e9b433b1f.tar.gz rails-5bdf50dbccf65cc4b6a50fe44a98318e9b433b1f.tar.bz2 rails-5bdf50dbccf65cc4b6a50fe44a98318e9b433b1f.zip |
Warn about do end syntax in redirect option
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/redirection.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/redirection.rb b/actionpack/lib/action_dispatch/routing/redirection.rb index 797ef84312..17c1cfb379 100644 --- a/actionpack/lib/action_dispatch/routing/redirection.rb +++ b/actionpack/lib/action_dispatch/routing/redirection.rb @@ -72,6 +72,9 @@ module ActionDispatch # "http://#{request.host_with_port}#{path}" # } # + # Note that the `do end` syntax for the redirect block wouldn't work, as Ruby would pass + # the block to `match` instead of `redirect`. Use `{ ... }` instead. + # # The options version of redirect allows you to supply only the parts of the url which need # to change, it also supports interpolation of the path similar to the first example. # |