You can clone with
Cannot retrieve contributors at this time
Subdomain RestrictionsA general purpose plugin for limiting a model to a subdomain by way of anActiveRecord model. This is a three pronged approach.The controller must find the specified model, and raises a 404 if it is notfound. It also sets the current subdomain into the model for all later access.The model side of things will restrict all finds to the scope of thesubdomain, if you want. It's a salt-shaker approach. You know, you saltyour beans and potatoes but not your steak. It will validate that theassociation exists for all salted models, too.For convienence, it also provides a looping iterator to evaluate your entireRails application in the scope of each defined subdomain. Just give it ablock and it will do whatever you want for each site in turn.The last bit is the session. The session gets all access automaticallyscoped to a subhash keyed on the subdomain as a symbol. That way you canlog into a site named 'foo' and not be logged into 'bar'.For a final bit of hotness, when you run a script/console session, there willbe no restrictions placed on your actions unless you manually callYourSubdomain.current = YourSubdomain.find_by_code 'somesite'This way you can manually adminster all of the models without any hassle.