Sha256: 7f0d65c2bdd0be4f57c3a6769732084d444afe4e250f8b5cc5c909efe6dfc709

Contents?: true

Size: 642 Bytes

Versions: 4

Compression:

Stored size: 642 Bytes

Contents

require "active_snapshot/version"
require "active_snapshot/config"

require 'active_support/lazy_load_hooks'

module ActiveSnapshot
  @@config = ActiveSnapshot::Config.new

  def self.config(&block)
    if block_given?
      block.call(@@config)
    else
      return @@config
    end
  end
end

ActiveSupport.on_load(:active_record) do
  require "active_snapshot/models/snapshot"
  require "active_snapshot/models/snapshot_item"

  require "active_snapshot/models/concerns/snapshots_concern"

  ActiveSnapshot.module_eval do
    extend ActiveSupport::Concern

    included do
      include ActiveSnapshot::SnapshotsConcern
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_snapshot-1.0.0 lib/active_snapshot.rb
active_snapshot-0.5.2 lib/active_snapshot.rb
active_snapshot-0.5.1 lib/active_snapshot.rb
active_snapshot-0.5.0 lib/active_snapshot.rb