Sha256: eb801f1c2f2a12081401714d1c733afd14cbbc72137635b88dc6caff7b5b7147
Contents?: true
Size: 472 Bytes
Versions: 13
Compression:
Stored size: 472 Bytes
Contents
require 'apartment/elevators/generic' Apartment.configure do |config| config.excluded_models = ['PandaPal::Organization', 'PandaPal::Session', 'Delayed::Job'] config.tenant_names = lambda { PandaPal::Organization.pluck(:name) } end Rails.application.config.middleware.use 'Apartment::Elevators::Generic', lambda { |request| if match = request.path.match(/\/(?:orgs|organizations)\/(\d+)/) PandaPal::Organization.find_by(id: match[1]).try(:name) end }
Version data entries
13 entries across 13 versions & 1 rubygems