Commit 34226e522f26350f87f36ea39d94b3b2f9787d55

Authored by Karpikau Andrei
1 parent 056456ae

check domain as global variable

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