Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment