11807: Migrate old records in jobs table from YAML to JSON.
[arvados.git] / apps / workbench / app / controllers / projects_controller.rb
index 273f9d0c8063c178489ca93972cf64c0b39bbc18..2cd668a28dcb58e438b91c41e97b59dfb1117724 100644 (file)
@@ -149,10 +149,9 @@ class ProjectsController < ApplicationController
         link.destroy
       end
 
-      # If this object has the 'trash_at' attribute, then simply mark it
-      # as trash.
-      if item.attributes.include?("trash_at")
-        item.update_attributes trash_at: Time.now
+      if item.class == Collection
+        # Use delete API on collections
+        item.destroy
         @removed_uuids << item.uuid
       elsif item.owner_uuid == @object.uuid
         # Object is owned by this project. Remove it from the project by