Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use a more exact regular expression for subdomain constraints so that…

… globalhealth.change.org doesn't match the constraint for health.change.org
  • Loading branch information...
commit 31a5f30c6088d41421bd563498daa1dd84712346 1 parent 82f7fae
@mdimas mdimas authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/subrails.rb
View
2  lib/subrails.rb
@@ -34,7 +34,7 @@ def subdomain *subdomains, &block
subdomains = subdomains.map(&:to_s)
if subdomains.length == 1
- constraints(:subdomain => subdomains.first) do
+ constraints(:subdomain => /^#{subdomains.first}$/) do
defaults(:subdomain => subdomains.first) do
yield
end
Please sign in to comment.
Something went wrong with that request. Please try again.