Sha256: 6def05340ec3a2a97cd3a317274720cda15d5672b39bc49f1f32be2b73353db8
Contents?: true
Size: 464 Bytes
Versions: 9
Compression:
Stored size: 464 Bytes
Contents
require 'apartment/elevators/subdomain' module Apartment module Elevators # Provides a rack based tenant switching solution based on the first subdomain # of a given domain name. # eg: # - example1.domain.com => example1 # - example2.something.domain.com => example2 class FirstSubdomain < Subdomain def parse_tenant_name(request) super.split('.')[0] unless super.nil? end end end end
Version data entries
9 entries across 9 versions & 2 rubygems