From 3697d74d48cd127dcb87095e3ee636cb973502d5 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Thu, 14 Jan 2016 18:13:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E5=9F=9F=E5=90=8D=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/routes.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 25dfa042e..08163a395 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -74,10 +74,10 @@ RedmineApp::Application.routes.draw do end Organization.where("domain is not null").each do |org| - org_domains = [] - org_domains << org.domain - #get '/', to: 'organizations#show', defaults: { id: org.id }, constraints: {subdomain: org.domain} - get '/', to: 'organizations#show', defaults: { id: org.id }, constraints: lambda{ |request| org_domains.include?(request.remote_ip) } + # org_domains = [] + # org_domains << org.domain + get '/', to: 'organizations#show', defaults: { id: org.id }, constraints: {subdomain: org.domain} + #get '/', to: 'organizations#show', defaults: { id: org.id }, constraints: lambda{ |request| org_domains.include?(request.remote_ip) } end get '/', to: 'organizations#show', defaults: { id: 5 }, constraints: {subdomain: 'micros'} get '/', to: 'organizations#show', defaults: { id: 23 }, constraints: {subdomain: 'nubot'}