gitlab-org--gitlab-foss/app/models/concerns/feature_gate.rb
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00

9 lines
135 B
Ruby

# frozen_string_literal: true
module FeatureGate
def flipper_id
return if new_record?
"#{self.class.name}:#{id}"
end
end