Commit 34226e522f26350f87f36ea39d94b3b2f9787d55

Authored by Karpikau Andrei
1 parent 056456ae

check domain as global variable

@@ -41,7 +41,6 @@ module Kanjai @@ -41,7 +41,6 @@ module Kanjai
41 if request.subdomain.to_s.present? 41 if request.subdomain.to_s.present?
42 domain_title = "#{request.subdomain}.#{domain_title}" 42 domain_title = "#{request.subdomain}.#{domain_title}"
43 end 43 end
44 - p domain_title  
45 44
46 domain = Domain.where(title: domain_title).first 45 domain = Domain.where(title: domain_title).first
47 46
@@ -89,7 +88,11 @@ module Kanjai @@ -89,7 +88,11 @@ module Kanjai
89 root_page = Page.joins(:domain).where(kanjai_domains: {id: domain.id}).where(root_page: true).first 88 root_page = Page.joins(:domain).where(kanjai_domains: {id: domain.id}).where(root_page: true).first
90 if root_page 89 if root_page
91 redirect_to root_page.menu_url($scheme) 90 redirect_to root_page.menu_url($scheme)
  91 + else
  92 + render text: "Can not found page #{@url} for domain #{domain_title}"
92 end 93 end
  94 + else
  95 + render text: "Can not found page #{@url} for domain #{domain_title}"
93 end 96 end
94 end 97 end
95 $url = @url 98 $url = @url
1 module Kanjai 1 module Kanjai
2 - VERSION = "0.0.215" 2 + VERSION = "0.0.216"
3 end 3 end