Created
March 23, 2012 15:09
-
-
Save jwo/2171557 to your computer and use it in GitHub Desktop.
ActiveAdmin on admin domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AdminDomain | |
def self.matches?(request) | |
request.subdomain =~ /admin/ | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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