Sha256: 5ba3953d699c9e58bed6cc370750cba805fc9fa7ea9430438a6265a9103b6efa

Contents?: true

Size: 278 Bytes

Versions: 9

Compression:

Stored size: 278 Bytes

Contents

module Cadenero
  # Constraints for the routes
  module Constraints
    # For the routes require that a subdomain is defined
    class SubdomainRequired
      def self.matches?(request)
        request.subdomain.present? && request.subdomain != "www"
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cadenero-0.0.2.b10 lib/cadenero/constraints/subdomain_required.rb
cadenero-0.0.2.b8 lib/cadenero/constraints/subdomain_required.rb
cadenero-0.0.2.b7 lib/cadenero/constraints/subdomain_required.rb
cadenero-0.0.2.b6 lib/cadenero/constraints/subdomain_required.rb
cadenero-0.0.2.b5 lib/cadenero/constraints/subdomain_required.rb
cadenero-0.0.2.b4 lib/cadenero/constraints/subdomain_required.rb
cadenero-0.0.2.b3 lib/cadenero/constraints/subdomain_required.rb
cadenero-0.0.2.b2 lib/cadenero/constraints/subdomain_required.rb
cadenero-0.0.2.b1 lib/cadenero/constraints/subdomain_required.rb