Sha256: cae376ab807ea54c7142d0aab28266bf30d1c35cf5d69195669b99116a3c075d

Contents?: true

Size: 482 Bytes

Versions: 1

Compression:

Stored size: 482 Bytes

Contents

module ActiveMetadata::Persistence
  
  PERSISTS_WITH = ActiveMetadata::CONFIG['persists_with']
  
  require "active_metadata/persistence/mongoid" if PERSISTS_WITH == 'mongoid'
  require "active_metadata/persistence/active_record" if PERSISTS_WITH == 'active_record' 
  
  def self.included(receiver)
    persister = PERSISTS_WITH == 'active_record' ? ActiveMetadata::Persistence::ActiveRecord : ActiveMetadata::Persistence::Mongoid 
    receiver.send :include, persister
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_metadata-0.1.9 lib/active_metadata/persistence/persistence.rb