Skip to content

Instantly share code, notes, and snippets.

@kylefox
Created November 19, 2009 17:57
Show Gist options
  • Select an option

  • Save kylefox/238935 to your computer and use it in GitHub Desktop.

Select an option

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