Skip to content
Browse files

Warn about do end syntax in redirect option

  • Loading branch information...
1 parent 8d2487d commit 5bdf50dbccf65cc4b6a50fe44a98318e9b433b1f @oscardelben oscardelben committed Apr 17, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 actionpack/lib/action_dispatch/routing/redirection.rb
View
3 actionpack/lib/action_dispatch/routing/redirection.rb
@@ -72,6 +72,9 @@ module Redirection
# "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.
#

0 comments on commit 5bdf50d

Please sign in to comment.
Something went wrong with that request. Please try again.