lib/dynamoid/document.rb
# Reload an object from the database -- if you suspect the object has changed in the datastore and you need those
# changes to be reflected immediately, you would call this method.
#
# @return [Dynamoid::Document] the document this method was called on
#
# @since 0.2.0
Reload an object from the database -- if you suspect the object has changed in the datastore and you need those
changes to be reflected immediately, you would call this method.
Reload an object from the database -- if you suspect the object has changed in the datastore and you need those changes to be reflected immediately you would call this method .
def reload
      self.attributes = self.class.find(hash_key, :range_key => range_value).attributes
      @associations.values.each(&:reset)
      self
    end
def reload self . attributes = self . class . find ( hash_key , :range_key => range_value ) . attributes @associations . values . each ( & :reset ) self end
Reload an object from the database -- if you suspect the object has changed in the datastore and you need those
changes to be reflected immediately, you would call this method.
Reload an object from the database -- if you suspect the object has changed in the datastore and you need those changes to be reflected immediately you would call this method .
the document this method was called on
the document this method was called on
Dynamoid::Document
since
None