Sha256: e57699a3aa3efdd5cb584021b1a9be47f7de5b43cfe65525d398441031c771c2
Contents?: true
Size: 453 Bytes
Versions: 14
Compression:
Stored size: 453 Bytes
Contents
require 'apartment/elevators/generic' Apartment.configure do |config| config.excluded_models = ['PandaPal::Organization', 'PandaPal::Session'] 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
14 entries across 14 versions & 1 rubygems