>
> You seem to have a defined list of controllers and a mapping of subdomains ?

Yea basically.

I want foo.domain.com to map to the equivalent of app.com/foo that is
go to foo_controller.rb


> I'm not sure either listing them out in the routes file, or using multiple
> constraints for each group of subdomains would not work?

This works but seems clumsy

constraints(SubDomainMatcher.new('benwilson')) do
    controller :ben_wilson do
      get "/", :action=>:index
      get :sign_up, :action=> :sign_up
    end
  end
   constraints(SubDomainMatcher.new('sunset_events')) do
    controller :sunset_events do
      get "/", :action=>:index
      get :sign_up, :action=> :sign_up
    end
  end


It would be so much nicer if I could specify the controller via a
variable but just can't seem to get that to work.

-- 
You received this message because you are subscribed to the Google Groups 
"WellRailed" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/wellrailed?hl=en.

Reply via email to