Sha256: 6ba683519e8adb388a84a67656130f13aa19c9ba661f758ec6098a8f0e1d8cea

Contents?: true

Size: 528 Bytes

Versions: 3

Compression:

Stored size: 528 Bytes

Contents

require "multi_config/version"

module MultiConfig
  if defined? Rails::Railtie
    require 'rails'
    class Railtie < Rails::Railtie
      initializer 'multi_config.active_record' do
        ActiveSupport.on_load :active_record do
          MultiConfig::Railtie.insert
        end
      end
    end
  end

  class Railtie
    def self.insert
      if defined?(ActiveRecord)
        require 'multi_config/orms/active_record'
        ActiveRecord::Base.send(:include, MultiConfig::ORMs::ActiveRecord)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
multi_config-0.1.1 lib/multi_config.rb
multi_config-0.1.0 lib/multi_config.rb
multi_config-0.0.1 lib/multi_config.rb