ActionController::Routing::Routes.draw do |map| map.namespace :admin, :path_prefix => '', :conditions => { :subdomain => 'admin' } do |admin| admin.root :controller => 'home' admin.logout 'logout', :controller => 'user_sessions', :action => :destroy admin.login 'login', :controller => 'user_sessions', :action => :new admin.resources 'users' admin.resources 'user_sessions' end map.root :controller => 'home' map.signup 'signup', :controller => 'users', :action => 'new' map.logout 'logout', :controller => 'user_sessions', :action => 'destroy' map.login 'login', :controller => 'user_sessions', :action => 'new' map.resource :account, :controller => :users map.resources :user_sessions map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end