Sha256: e77a87c25108481c46e040e952769e9d13681273d8c9469257fd1953e36a4f48

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

module SyncMachine
  module OrmAdapter
    # Adapt SyncMachine for use with ActiveRecord-based applications.
    module ActiveRecord
      def self.setup
        require "active_record"
        require "wisper/active_record"
        Wisper::ActiveRecord.extend_all
      end

      def self.change_listener_changed_keys(record)
        record.previous_changes.keys
      end

      def self.record_id_for_job(record_id)
        record_id
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sync_machine-0.2.0 lib/sync_machine/orm_adapter/active_record.rb