Fallout from #3036: the test for the checkbox value on acceptance of the
authorWard Vandewege <ward@curoverse.com>
Thu, 11 Sep 2014 19:01:41 +0000 (15:01 -0400)
committerWard Vandewege <ward@curoverse.com>
Thu, 11 Sep 2014 19:01:41 +0000 (15:01 -0400)
user agreement was expecting a keep hash, rather than an Arvados UUID.

This fixes accepting the user agreement (if one or more are present).

refs #3036

apps/workbench/app/controllers/user_agreements_controller.rb

index f8c316e58c7606c086a6e91132f14c381e02f1e8..bec11f2dc6bd5c5d76a4d2f89cbe706fc0673024 100644 (file)
@@ -15,7 +15,7 @@ class UserAgreementsController < ApplicationController
 
   def sign
     params[:checked].each do |checked|
-      if r = checked.match(/^([0-9a-f]+[^\/]*)/)
+      if (r = CollectionsHelper.match_uuid_with_optional_filepath(checked))
         UserAgreement.sign uuid: r[1]
       end
     end