Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add update_attributes to task.

  • Loading branch information...
commit 709acda5913ef515e834f9b3c49462ad1b830f8d 1 parent 1f371dd
@jrichardlai authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/taskrabbit/task.rb
View
7 lib/taskrabbit/task.rb
@@ -50,6 +50,13 @@ def save
end
end
+ def update_attributes(attributes)
+ attributes.each_pair do |key, value|
+ self.send("#{key}=", value)
+ end
+ save
+ end
+
def new_record?
!id
end
Please sign in to comment.
Something went wrong with that request. Please try again.