I want my Sinatra app to allow users to create an account and access it via a subdomain (i.e. your-account.myapp.com).
I found this to extract subdomains (http://gist.github.com/55784#file_subdomains.rb) but I'm having a hard time implementing it.
Any ideas?
I have an Account model (datamapper) with a field called account name, which should be the subdomain.
Thanks!