Files
fizzy/config/initializers/tenanting.rb
T
Mike Dalessio d8075b74b7 hack: to handle tenantname.fizzy.37signals.com
Let's do the needful thing for now, and clean it up once the gem has
exposed the tenant resolver as a config in a cleaner way.
2025-03-12 07:53:31 -04:00

5 lines
222 B
Ruby

Rails.application.configure do |config|
# uuugh this resolver proc is so gross.
config.middleware.use ActiveRecord::Tenanted::TenantSelector, "ApplicationRecord", ->(request) { request.subdomain.split(".").first }
end