20300: Change deprecated update_attributes to update.
[arvados.git] / apps / workbench / app / controllers / container_requests_controller.rb
index 62ec3e15073802f4f184ddbbb258263887d3b77b..9fb534ec24f163cc6bfcb9e24a2cb2cffadd1937 100644 (file)
@@ -83,7 +83,7 @@ class ContainerRequestsController < ApplicationController
         @object.state = 'Final'
       end
     end
-    @object.update_attributes! priority: 0
+    @object.update! priority: 0
     if params[:return_to]
       redirect_to params[:return_to]
     else
@@ -178,18 +178,18 @@ class ContainerRequestsController < ApplicationController
 
     if params[:use_existing] || params[:use_existing].nil?
       # If nil, reuse workflow steps but not the workflow runner.
-      @object.use_existing = (params[:use_existing] ? true : false)
+      @object.use_existing = !!params[:use_existing]
 
       # Pass the correct argument to arvados-cwl-runner command.
       if command[0] == 'arvados-cwl-runner'
-        command -= ['--disable-reuse']
+        command -= ["--disable-reuse", "--enable-reuse"]
         command.insert(1, '--enable-reuse')
       end
     else
       @object.use_existing = false
       # Pass the correct argument to arvados-cwl-runner command.
       if command[0] == 'arvados-cwl-runner'
-        command -= ['--enable-reuse']
+        command -= ["--disable-reuse", "--enable-reuse"]
         command.insert(1, '--disable-reuse')
       end
     end