Pages tagged subdomain:

Robby on Rails : Subdomain accounts with Ruby on Rails explained
http://www.robbyonrails.com/articles/2009/01/11/subdomain-accounts-with-ruby-on-rails-explained
How to do Basecamp-style subdomains in Rails - (37signals)
http://www.37signals.com/svn/posts/1512-how-to-do-basecamp-style-subdomains-in-rails

shae
gist: 44410 — GitHub
http://gist.github.com/44410
request.subdomains.first
Multiple Domains für eine Anwendung à la *.domain.irgendwo.
# 1) Point *.example.com in your DNS setup to your server. # # 2) Setup an Apache vhost to catch the star pointer: # # <VirtualHost *:80> # ServerName *.example.com # </VirtualHost> # # 3) Set the current account from the subdomain class ApplicationController < ActionController::Base before_filter :set_current_account private def set_current_account @current_account = Account.find_by_subdomain(request.subdomains.first) end end # 4) Tie all top-level requests off the current account class CustomersController < ApplicationController def index @customers = @current_account.customers end end
Subdomains