Hi *, I''m trying to use subdomains on Rails 3, but haven''t
been able to test the behaviour:
it "routes ''http://test.example.com/dashboard'' to
UsersController#show with subdomain ''test''" do
{ :get => ''http://test.example.com/dashboard'' }.should
route_to(
:controller => ''users'', :action =>
''show'', :subdomain => ''test'' )
end
My route is:
constraints( :subdomain => /.+/ ) do
match ''/dashboard'' => ''users#show''
end
The test fails like this:
The recognized options <{"action"=>"show",
"controller"=>"users"}> did not match
<{"action"=>"show",
"subdomain"=>"test",
"controller"=>"users"}>, difference:
<{"subdomain"=>"test"}>
I found many references to this syntax and usage on Google, but even from
console the subdomain is only in the request object.
Someone managed to do something like this and can share ?
I''ve also tried to use subdomain-fu, but no success so far
ngw
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.