Module: SubdomainRoutes::Validations
- Defined in:
- lib/subdomain_routes/validations.rb
Overview
# Alternatively, we use URI::parse instead. This gives more lenient subdomains however: def self.valid_subdomain?(subdomain)
URI.parse "http://#{subdomain}.example.com"
rescue URI::InvalidURIError
false
end
Defined Under Namespace
Modules: ClassMethods