lib/pivotal-tracker/task.rb in pivotal-tracker-0.5.6 vs lib/pivotal-tracker/task.rb in pivotal-tracker-0.5.7

- old
+ new

@@ -23,19 +23,20 @@ if attributes[:owner] self.story = attributes.delete(:owner) self.project_id = self.story.project_id self.story_id = self.story.id end - + update_attributes(attributes) end - + def create response = Client.connection["/projects/#{project_id}/stories/#{story_id}/tasks"].post(self.to_xml, :content_type => 'application/xml') return Task.parse(response) end - def update + def update(attr = {}) + update_attributes(attr) response = Client.connection["/projects/#{project_id}/stories/#{story_id}/tasks/#{id}"].put(self.to_xml, :content_type => 'application/xml') return Task.parse(response) end def delete