Browse files

Merge pull request #133 from tjalil/master

added update_attribute method to base.rb
  • Loading branch information...
2 parents d2b74f9 + 864e596 commit 52f8a00e85270b460bb4d4da2ff281d2e20f6fd2 @adelevie committed Dec 30, 2015
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/parse_resource/base.rb
View
5 lib/parse_resource/base.rb
@@ -577,6 +577,11 @@ def update_attributes(attributes = {})
self.update(attributes)
end
+ def update_attribute(key, value)
+ send(key.to_s + '=', value)
+ update
+ end
+
def destroy
if self.instance_resource.delete
@attributes = {}

0 comments on commit 52f8a00

Please sign in to comment.