aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-09 15:34:26 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-09 15:35:20 -0200
commita99d5424b04f22d1c738e69a00deca0b3f5d1ff0 (patch)
tree317bde9ce93cc641ac6687c318fbac5e3417571c /actionpack/lib/action_dispatch/routing
parent054578a45bbc4995e51bccf852657f35d8d9b0b2 (diff)
downloadrails-a99d5424b04f22d1c738e69a00deca0b3f5d1ff0.tar.gz
rails-a99d5424b04f22d1c738e69a00deca0b3f5d1ff0.tar.bz2
rails-a99d5424b04f22d1c738e69a00deca0b3f5d1ff0.zip
Fix redirect example block
See #8160. [ci skip]
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/redirection.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/redirection.rb b/actionpack/lib/action_dispatch/routing/redirection.rb
index dc28389360..50b20a2a25 100644
--- a/actionpack/lib/action_dispatch/routing/redirection.rb
+++ b/actionpack/lib/action_dispatch/routing/redirection.rb
@@ -78,10 +78,10 @@ module ActionDispatch
# params, depending of how many arguments your block accepts. A string is required as a
# return value.
#
- # match 'jokes/:number', :to => redirect do |params, request|
- # path = (params[:number].to_i.even? ? "/wheres-the-beef" : "/i-love-lamp")
+ # match 'jokes/:number', :to => redirect { |params, request|
+ # path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp")
# "http://#{request.host_with_port}/#{path}"
- # end
+ # }
#
# 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.