class Apartment::Reloader
def call(env)
def call(env) Database.init @app.call(env) end
def initialize(app)
Also see apartment/console for the re-definition of reload! that re-init's Apartment
so I've used this in the meantime.
I couldn't figure out how to properly hook into the Rails reload process *after* files are reloaded
That is prepended with the schema (if using postgresql schemas)
Necessary due to code reload (annoying). When models are reloaded, they no longer have the proper table_name
Middleware used in development to init Apartment for each request
def initialize(app) @app = app end