From 63477fd27f3eeff5d5f612b27ed71c76926934d2 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 30 Jun 2016 21:38:29 +0800 Subject: [PATCH] Disable Metrics/CyclomaticComplexity for Ability.allowed There's little point to cut that down. --- app/models/ability.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/ability.rb b/app/models/ability.rb index 0add2f5a34a..ba1f2ae4075 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -1,5 +1,6 @@ class Ability class << self + # rubocop: disable Metrics/CyclomaticComplexity def allowed(user, subject) return anonymous_abilities(user, subject) if user.nil? return [] unless user.is_a?(User)