Module: Tenacity::OrmExt::CouchRest::InstanceMethods

Defined in:
lib/tenacity/orm_ext/couchrest.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#_t_mark_dirtyObject



140
141
142
143
144
# File 'lib/tenacity/orm_ext/couchrest.rb', line 140

def _t_mark_dirty
  send :_tenacity_ddt_will_change!
rescue NoMethodError
  # No dirty tracking support for this version of CouchRest
end

#_t_reloadObject



146
147
148
149
150
151
152
153
# File 'lib/tenacity/orm_ext/couchrest.rb', line 146

def _t_reload
  unless self.id.nil?
    new_doc = database.get(self.id)
    self.clear
    new_doc.each { |k,v| self[k] = new_doc[k] }
  end
  self
end

#_t_save_if_dirty(*args) ⇒ Object



155
156
157
# File 'lib/tenacity/orm_ext/couchrest.rb', line 155

def _t_save_if_dirty(*args)
  save(*args)
end