app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def load_schema
    Apartment::Tenant.switch!("public")
    return unless request.subdomain.present?
    if current_account
      Apartment::Tenant.switch!(request.subdomain)
    else
      redirect_to root_url(subdomain: false)
    end
  end
def load_schema Apartment :: Tenant . switch! ( "public" ) return unless request . subdomain . present? if current_account Apartment :: Tenant . switch! ( request . subdomain ) else redirect_to root_url ( subdomain : false ) end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .