Skip to content

Instantly share code, notes, and snippets.

@gmontard
Last active August 29, 2015 14:02
Show Gist options
  • Save gmontard/7c26e50cc4e5230a00d0 to your computer and use it in GitHub Desktop.
Save gmontard/7c26e50cc4e5230a00d0 to your computer and use it in GitHub Desktop.
class DomainConstraint
def initialize
end
def matches?(request)
domains = Domain.select("DISTINCT domain").map(&:domain).uniq
domains.include?(request.host)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment