Sha256: fb7662b11e4eeb0a9165c0697f5aa65b168896cb4b577655b2b5b8a8a1b82929

Contents?: true

Size: 531 Bytes

Versions: 6

Compression:

Stored size: 531 Bytes

Contents

require 'fresh_connection/executor_hook'

module FreshConnection
  class Railtie < Rails::Railtie
    initializer "fresh_connection.configure_rails_initialization" do |app|
      ActiveSupport.on_load(:active_record) do
        FreshConnection::ExecutorHook.install_executor_hooks
      end
    end

    initializer "fresh_connection.initialize_database", after: "active_record.initialize_database" do
      ActiveSupport.on_load(:active_record) do
        ActiveRecord::Base.establish_fresh_connection
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fresh_connection-2.4.2 lib/fresh_connection/railtie.rb
fresh_connection-2.4.1 lib/fresh_connection/railtie.rb
fresh_connection-2.4.0 lib/fresh_connection/railtie.rb
fresh_connection-2.4.0.rc4 lib/fresh_connection/railtie.rb
fresh_connection-2.4.0.rc3 lib/fresh_connection/railtie.rb
fresh_connection-2.4.0.rc1 lib/fresh_connection/railtie.rb