In Rails 3.2.11 application, I have the following routes for redirecting www to non-www:
constraints(:host => /www.foo.com/) do
root :to => redirect("http://foo.com")
match '/*path', :to => redirect {|params| "http://foo.com/#{params[:path]}"}
end
In any case, rspec displays the following warning:
DEPRECATION WARNING: redirect blocks with arity of 1 are deprecated. Your block must take 2 parameters: the environment, and a request object. (called from block (2 levels) in <top (required)> at /foo/config/routes.rb:6)
I was not able to find something on Google, so I thought to ask if anyone knows how I can get rid of this warning.
thank
source
share