Skip to content

Instantly share code, notes, and snippets.

@kylefox
Created November 19, 2009 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylefox/238935 to your computer and use it in GitHub Desktop.
Save kylefox/238935 to your computer and use it in GitHub Desktop.
# Using Jamis Buck's routing tricks (http://github.com/rsl/routing_tricks)
ActionController::Routing::Routes.draw do |map|
# These routes only get loaded on exam_admin.com
map.namespace :admin, :path_prefix => '', :conditions => {:domain => "exam_admin.com"} do |admin|
admin.connect "/", :controller => "user"
admin.resources :exams
end
# These routes will get loaded for all custom domains
map.namespace :measure, :path_prefix => '' do |measure|
measure.connect "/", :controller => "user"
measure.resources :exams
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment