Disable Metrics/CyclomaticComplexity for Ability.allowed

There's little point to cut that down.
This commit is contained in:
Lin Jen-Shin 2016-06-30 21:38:29 +08:00
parent 59413153f5
commit 63477fd27f
1 changed files with 1 additions and 0 deletions

View File

@ -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)