Skip to content
Browse files

Fix redirect example block

See #8160. [ci skip]
  • Loading branch information...
1 parent 054578a commit a99d5424b04f22d1c738e69a00deca0b3f5d1ff0 @carlosantoniodasilva carlosantoniodasilva committed Nov 9, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_dispatch/routing/redirection.rb
View
6 actionpack/lib/action_dispatch/routing/redirection.rb
@@ -78,10 +78,10 @@ module Redirection
# 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.

0 comments on commit a99d542

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