Merge branch '3605-node-info-field' refs #3605
[arvados.git] / apps / workbench / app / controllers / actions_controller.rb
index fc29ec26594ec7bf440e5f812e7fec54088a88a8..347644bdbd141092051173315e52afcc3548d03f 100644 (file)
@@ -158,6 +158,7 @@ class ActionsController < ApplicationController
 
     normalized = arv_normalize combined
     newc = Collection.new({:manifest_text => normalized})
+    newc.name = newc.name || "Collection created at #{Time.now.localtime}"
     newc.save!
 
     chash.each do |k,v|
@@ -172,13 +173,9 @@ class ActionsController < ApplicationController
 
     action_data = JSON.parse(params['action_data']) if params['action_data']
     if action_data && action_data['selection_param'].eql?('project')
-      respond_to do |format|
-        format.js {render inline: "location.reload();" }
-      end
+      redirect_to :back
     else
-      respond_to do |format|
-        format.js {redirect_to url_for(controller: 'collections', action: :show, id: newc.uuid)}
-      end
+      redirect_to url_for(controller: 'collections', action: :show, id: newc.uuid)
     end
   end