Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map.with_options root controller #4

Open
f10i opened this issue Dec 30, 2009 · 2 comments
Open

map.with_options root controller #4

f10i opened this issue Dec 30, 2009 · 2 comments

Comments

@f10i
Copy link

f10i commented Dec 30, 2009

Hello,
I defined the following route:

map.with_options :conditions => {:subdomain => 'foo'} do |bar|
bar.resources :users
end

How can I define a root route for this subdomain? so that if anybody visits foo.example.com, they'll be automatically redirected to that controller?

I tried the following two rules with no luck:

  1. bar.root :controller => 'abc'
  2. bar.connect '/', :controller => 'abc'

Any ideas?

@ogennadi
Copy link

ogennadi commented Jul 8, 2011

Hey, I'm having the same problem, too, but on rails 3. Did you ever figure out a solution?

@f10i
Copy link
Author

f10i commented Jul 8, 2011

IIRC, I solved it with the following route:

bar.connect '', :controller => 'abc'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants