route to conference#show for custom domain

This commit is contained in:
shlok007 2017-07-22 12:34:48 +05:30
parent edd0024a17
commit 3e7d6e4b04
5 changed files with 26 additions and 3 deletions

View file

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

View file

@ -1,5 +1,9 @@
Osem::Application.routes.draw do
constraints DomainConstraint do
get '/', to: 'conferences#show'
end
if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
devise_for :users, controllers: { registrations: :registrations }
else