From 2039c8280db1646845c33d6c5a74e5f23ca6f4de Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 27 Aug 2018 17:31:01 +0200 Subject: Disable existing offenses for the CodeReuse cops This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop. --- lib/api/system_hooks.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/api/system_hooks.rb') diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb index c7a460df46a..07552aa18e8 100644 --- a/lib/api/system_hooks.rb +++ b/lib/api/system_hooks.rb @@ -63,12 +63,14 @@ module API params do requires :id, type: Integer, desc: 'The ID of the system hook' end + # rubocop: disable CodeReuse/ActiveRecord delete ":id" do hook = SystemHook.find_by(id: params[:id]) not_found!('System hook') unless hook destroy_conditionally!(hook) end + # rubocop: enable CodeReuse/ActiveRecord end end end -- cgit v1.2.1