Skip to content

Instantly share code, notes, and snippets.

@jwo
Created March 23, 2012 15:09
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 jwo/2171557 to your computer and use it in GitHub Desktop.
Save jwo/2171557 to your computer and use it in GitHub Desktop.
ActiveAdmin on admin domain
class AdminDomain
def self.matches?(request)
request.subdomain =~ /admin/
end
end
YourApp::Application.routes.draw do
# We'll constrain admin to only respond on admin.yoapp.com
constraints(AdminDomain) do
ActiveAdmin.routes(self)
devise_for :admin_users, ActiveAdmin::Devise.config
end
# rest of yo'app here
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment