From ff6714bfaf5dcd1afac12ebdbbd14ae56cfe0f6c Mon Sep 17 00:00:00 2001 From: Marek Takac Date: Thu, 24 Jul 2014 13:17:18 +0200 Subject: [PATCH] Changed delete to destroy when removing relation --- lib/api/v3/relations/relations_api.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/api/v3/relations/relations_api.rb b/lib/api/v3/relations/relations_api.rb index 7c6eb4dd1d..762137842e 100644 --- a/lib/api/v3/relations/relations_api.rb +++ b/lib/api/v3/relations/relations_api.rb @@ -31,8 +31,7 @@ module API namespace ':relation_id' do delete do authorize(:manage_work_package_relations, context: @work_package.project) - relation = Relation.find(params[:relation_id]) - relation.delete + Relation.destroy(params[:id]) status 204 end end