osem-fcy/config/initializers/domain_constraint.rb
shlok007 754464685f refactored DomainConstraint and conference_controller_spec
use params id instead of OSEM_HOSTNAME to load conference
2017-08-20 15:39:33 +05:30

6 lines
176 B
Ruby

class DomainConstraint
def self.matches?(request)
domains = Conference.where.not(custom_domain: nil).pluck(:custom_domain)
domains.include?(request.domain)
end
end