diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2019-02-08 15:19:53 +0300 |
---|---|---|
committer | Andrew Newdigate <andrew@gitlab.com> | 2019-03-06 18:51:56 +0300 |
commit | 3288e1a874ec0184f9f27f932748e51c57babf17 (patch) | |
tree | 9f8667f5349ecfc59f3c8a6e9641cb1e32fa3d5b /app/serializers | |
parent | 7bbdb2a29fbc7b8c9f879c42de7063adaa8313c7 (diff) |
Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/concerns/user_status_tooltip.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/concerns/user_status_tooltip.rb b/app/serializers/concerns/user_status_tooltip.rb index aa6e67e3351..633b117d392 100644 --- a/app/serializers/concerns/user_status_tooltip.rb +++ b/app/serializers/concerns/user_status_tooltip.rb @@ -11,7 +11,7 @@ module UserStatusTooltip expose :user_status_if_loaded, as: :status_tooltip_html def user_status_if_loaded - return nil unless object.association(:status).loaded? + return unless object.association(:status).loaded? user_status(object) end |