Showing
2 changed files
with
5 additions
and
2 deletions
| @@ -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 |