Merge branch 'master' into rebased_1530

This commit is contained in:
Shlok Srivastava 2017-08-23 18:58:02 +00:00 committed by GitHub
commit aebdd66034
12 changed files with 90 additions and 24 deletions

View file

@ -0,0 +1,6 @@
class DomainConstraint
def self.matches?(request)
domains = Conference.where.not(custom_domain: nil).pluck(:custom_domain)
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
@ -53,6 +57,7 @@ Osem::Application.routes.draw do
patch :reset
patch :to_reject
patch :cancel
patch :confirm
end
end