module SyncClient::Publisher::MongoidPublisher
Public Instance Methods
any_attributes_changed?(attributes)
click to toggle source
# File lib/sync_client/publisher/mongoid_publisher.rb, line 12 def any_attributes_changed?(attributes) attributes.any?{|attr| send("#{attr}_changed?")} end
publisher_attributes()
click to toggle source
# File lib/sync_client/publisher/mongoid_publisher.rb, line 16 def publisher_attributes self.attributes.inject({}) { |attrs, (raw_key, raw_value)| if raw_key =='_id' attrs['id'] = raw_value else attrs[self.aliased_fields.invert.fetch(raw_key) { raw_key }] = raw_value end attrs } end