Ensuring update_attributes cannot be called in CastedModel as per issue #9
This commit is contained in:
parent
c32992c21b
commit
fafbfff474
3 changed files with 19 additions and 7 deletions
|
@ -62,6 +62,20 @@ module CouchRest
|
|||
end
|
||||
end
|
||||
|
||||
# Update the document's attributes and save. For example:
|
||||
#
|
||||
# doc.update_attributes :name => "Fred"
|
||||
#
|
||||
# Is the equivilent of doing the following:
|
||||
#
|
||||
# doc.attributes = { :name => "Fred" }
|
||||
# doc.save
|
||||
#
|
||||
def update_attributes(hash)
|
||||
update_attributes_without_saving hash
|
||||
save
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def perform_validations(options = {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue