Sha256: ac686928965f94c1a205a59b713f29ecb8f7ff87223089da37da2f1d3c27d30e
Contents?: true
Size: 487 Bytes
Versions: 6
Compression:
Stored size: 487 Bytes
Contents
module ActiveRecord::Duplicate if defined?(Rails::Railtie) require 'rails' class Railtie < Rails::Railtie initializer 'activerecord-duplicate.insert_into_active_record' do ActiveSupport.on_load(:active_record) do ActiveRecord::Duplicate::Railtie.insert end end end end class Railtie def self.insert if defined?(ActiveRecord) ActiveRecord::Base.send(:include, ActiveRecord::Duplicate) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems