Sha256: 5bfced94660ae43c6b9e516ac5ff077de864831239ff9b14c5f17f4949c3de05

Contents?: true

Size: 497 Bytes

Versions: 1

Compression:

Stored size: 497 Bytes

Contents

require 'ixtlan/optimistic/active_record'
require 'ixtlan/optimistic/data_mapper'
module Ixtlan
  module Optimistic
    class Railtie < Rails::Railtie

      config.after_initialize do
        if defined? ::DataMapper

          ::DataMapper::Model.append_inclusions(Ixtlan::Optimistic::DataMapper)

        elsif defined? ::ActiveRecord

          ::ActiveRecord::Base.send(:include, 
                                    Ixtlan::Optimistic::ActiveRecord)

        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ixtlan-optimistic-0.1.0 lib/ixtlan/optimistic/railtie.rb