refactored DomainConstraint and conference_controller_spec

use params id instead of OSEM_HOSTNAME to load conference
This commit is contained in:
shlok007 2017-08-02 20:16:50 +05:30
parent e6f6a00d43
commit ec435b6503
3 changed files with 18 additions and 9 deletions

View file

@ -1,6 +1,6 @@
class DomainConstraint
def self.matches?(request)
@domains = Conference.pluck(:custom_domain).compact
@domains.include?(request.domain)
domains = Conference.where.not(custom_domain: nil).pluck(:custom_domain)
domains.include?(request.domain)
end
end
end