diff --git a/lib/starter/builder/active_record.rb b/lib/starter/builder/active_record.rb index b988e2a..3856cf5 100644 --- a/lib/starter/builder/active_record.rb +++ b/lib/starter/builder/active_record.rb @@ -46,12 +46,12 @@ def initialize(app) def call(env) response = @app.call(env) response[2] = ::Rack::BodyProxy.new(response[2]) do - ActiveRecord::Base.clear_active_connections! + ActiveRecord::Base.connection_handler.clear_active_connections! end return response rescue StandardError - ActiveRecord::Base.clear_active_connections! + ActiveRecord::Base.connection_handler.clear_active_connections! raise end end diff --git a/lib/starter/orms.rb b/lib/starter/orms.rb index 3e82e2b..aa52140 100644 --- a/lib/starter/orms.rb +++ b/lib/starter/orms.rb @@ -36,21 +36,18 @@ def config adapter: #{adapter} encoding: unicode timeout: 5000 - user: postgres database: #{@name}_development test: adapter: #{adapter} encoding: unicode timeout: 5000 - user: postgres database: #{@name}_test production: adapter: #{adapter} encoding: unicode timeout: 5000 - user: postgres database: #{@name}_production FILE end