Fixing problem with reloading models and dirty tracking
This commit is contained in:
parent
de1cab1271
commit
f5be6c7679
2 changed files with 9 additions and 1 deletions
|
@ -87,7 +87,7 @@ module CouchRest
|
|||
#
|
||||
# Returns self.
|
||||
def reload
|
||||
merge!(self.class.get(id))
|
||||
prepare_all_attributes(database.get(id), :directly_set_attributes => true)
|
||||
self
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue