Fixes PipelineInstancesControllerTest. application_controller#create now does
[arvados.git] / apps / workbench / app / models / job.rb
index f88834e0c3f102ca1219fd68e6d655bd0352faa7..173d3a06964fb5667b9546aee4bab518baf3c190 100644 (file)
@@ -1,5 +1,17 @@
 class Job < ArvadosBase
-  def attribute_editable?(attr)
+  def self.goes_in_folders?
+    true
+  end
+
+  def attribute_editable? attr, *args
+    false
+  end
+
+  def self.creatable?
     false
   end
+
+  def cancel
+    arvados_api_client.api "jobs/#{self.uuid}/", "cancel", {}
+  end
 end