Account location is a set of protected methods that supports the account-key-as-subdomain way of identifying the current scope.
David Heinemeier Hansson
gem "rails_account_location", "~> 1.0.1"