X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9ba66dcc4f4c166fa08512ce0c75e324f26c7b0d..73d73c7b799ddb60363ddf409d8d301b27c82c00:/apps/workbench/app/controllers/actions_controller.rb diff --git a/apps/workbench/app/controllers/actions_controller.rb b/apps/workbench/app/controllers/actions_controller.rb index 6f5ed608e9..8a817f03cd 100644 --- a/apps/workbench/app/controllers/actions_controller.rb +++ b/apps/workbench/app/controllers/actions_controller.rb @@ -1,10 +1,13 @@ class ActionsController < ApplicationController + + skip_before_filter :find_object_by_uuid, only: :post + def combine_selected_files_into_collection lst = [] files = [] params["selection"].each do |s| m = CollectionsHelper.match(s) - if m[1] and m[2] + if m and m[1] and m[2] lst.append(m[1] + m[2]) files.append(m) end @@ -71,12 +74,22 @@ class ActionsController < ApplicationController newc = Collection.new({:uuid => newuuid, :manifest_text => normalized}) newc.save! - '/collections/' + newc.uuid + chash.each do |k,v| + l = Link.new({ + tail_uuid: k, + head_uuid: newuuid, + link_class: "provenance", + name: "provided" + }) + l.save! + end + + redirect_to controller: 'collections', action: :show, id: newc.uuid end def post if params["combine_selected_files_into_collection"] - redirect_to combine_selected_files_into_collection + combine_selected_files_into_collection else redirect_to :back end