Created
February 13, 2011 15:07
-
-
Save misza222/824746 to your computer and use it in GitHub Desktop.
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 ShopRoutesConstraint | |
def self.matches?(request) | |
! ADMIN_DOMAIN_NAMES.include?(request.host) | |
end | |
end | |
class AdminRoutesConstraint | |
def self.matches?(request) | |
ADMIN_DOMAIN_NAMES.include?(request.host) | |
end | |
end | |
Takeaway::Application.routes.draw do | |
constraints(AdminRoutesConstraint) do | |
devise_for :shop_admins | |
end | |
constraints(ShopRoutesConstraint) do | |
devise_for :clients | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment