After banging my head on this same issue I found this:
http://mbleigh.lighthouseapp.com/projects/13148/tickets/1-subdomain-route-conditions#ticket-1-6
The fix for me was to install it as a plugin in my Rails app, not as a
gem.
On Aug 26, 7:22 pm, emarthinsen
<emarthin...-wDk3GJWIFSIagCBP5wnx4wC/G2K4zDHf@public.gmane.org>
wrote:> Hello-
>
> I''m having some difficulty withSubdomainFu(or my app, not to
> falsely accuse). I have two controllers: home and account_root. I want
> the home controller to be used whenever someone goes towww.myapp.com
> and I want account_root to be used if someone goes to
> myaccount.myapp.com. I set up the following routes:
>
> map.account_root '''', :controller =>
''account_root'', :conditions =>
> { :subdomain=> /.+/ }
> map.root :controller => ''home''
>
> This is similar to what was done in episode 123 of RailsCasts. The
> problem is that the condition doesn''t seem to be working.
Regardless
> of what URL I go to, I always get sent to the account_root controller.
>
> Does anyone know what I might be doing wrong?
>
> Regards-
> Eric
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---