Module: Nsync::ActiveRecord::Producer::InstanceMethods

Defined in:
lib/nsync/active_record/producer/methods.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
# File 'lib/nsync/active_record/producer/methods.rb', line 5

def self.included(base)
  base.class_eval do
    after_save :nsync_write
    before_destroy :nsync_destroy
  end
end

Instance Method Details

#to_nsync_hashObject



12
13
14
# File 'lib/nsync/active_record/producer/methods.rb', line 12

def to_nsync_hash
  attributes
end