I have an app with two sections, Buyers and Sellers. The main section '/' is for Buyers, but I have a separate Sellers portal that I'm currently placing in /sellers. Might be nicer to move the sellers to their own subdomain like 'sellers.mydomain.com'.
Subdomains don't seem to be extremely popular and I've read things like they make testing difficult, etc. Wondering what you all have to say about the issue.
There are a few things that make testing a bit of pain with subdomains, but introducing subdomains as a real supported feature in rails 3 has somewhat mitigated these problems.
EDIT: Adding something like this to your test helper can make testing a lot easier and more readable.
def set_subdomain(sub)
@request.host = sub.present?? "#{sub}.test.host" : "test.host"
end
EDITx2:
http://www.railscasts.com/episodes/221-subdomains-in-rails-3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With