dev_hjq
huang 10 years ago
commit 71e155d83a

@ -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'}

Loading…
Cancel
Save