21205: Now adds the final part of the uuid to make the name unique
[arvados.git] / services / api / lib / trashable.rb
index c99b08513b64a57b046dccea7905ca032bd3b916..50611c305ded5d1d166914b1066f6d348a2af51b 100644 (file)
@@ -93,19 +93,19 @@ end
 module TrashableController
   def destroy
     if !@object.is_trashed
-      @object.update_attributes!(trash_at: db_current_time)
+      @object.update!(trash_at: db_current_time)
     end
     earliest_delete = (@object.trash_at +
                        Rails.configuration.Collections.BlobSigningTTL)
     if @object.delete_at > earliest_delete
-      @object.update_attributes!(delete_at: earliest_delete)
+      @object.update!(delete_at: earliest_delete)
     end
     show
   end
 
   def trash
     if !@object.is_trashed
-      @object.update_attributes!(trash_at: db_current_time)
+      @object.update!(trash_at: db_current_time)
     end
     show
   end