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 committed by Shlok Srivastava
parent 66b48be968
commit 835859e350
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