Sha256: b985deb3dc4306502a7b232e9be7d91487383a16d6b51080f50c1127ee2fdd5e
Contents?: true
Size: 680 Bytes
Versions: 16
Compression:
Stored size: 680 Bytes
Contents
module Apartment class Reloader # Middleware used in development to init Apartment for each request # Necessary due to code reload (annoying). When models are reloaded, they no longer have the proper table_name # That is prepended with the schema (if using postgresql schemas) # I couldn't figure out how to properly hook into the Rails reload process *after* files are reloaded # so I've used this in the meantime. # # Also see apartment/console for the re-definition of reload! that re-init's Apartment # def initialize(app) @app = app end def call(env) Tenant.init @app.call(env) end end end
Version data entries
16 entries across 16 versions & 2 rubygems