ModuleActionDispatch::Routing::Redirection - actionpack/lib/action_dispatch/routing/redirection.rb <../../../files/actionpack/lib/action_dispatch/routing/redirection_rb.html> match ''jokes/:number'', :to => redirect do |params, request| path = (params[:number].to_i.even? ? "/wheres-the-beef" : "/i-love-lamp") "http://#{request.host_with_port}/#{path}"end the example can not work in rails 3.2.2 can anyone can help me? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/wMq3GxZUNGkJ. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.