From 3288e1a874ec0184f9f27f932748e51c57babf17 Mon Sep 17 00:00:00 2001 From: Andrew Newdigate Date: Fri, 8 Feb 2019 14:19:53 +0200 Subject: Adds the Rubocop ReturnNil cop This style change enforces `return if ...` instead of `return nil if ...` to save maintainers a few minor review points --- app/controllers/concerns/renders_notes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/concerns/renders_notes.rb') diff --git a/app/controllers/concerns/renders_notes.rb b/app/controllers/concerns/renders_notes.rb index ce36da6b715..18015b1de88 100644 --- a/app/controllers/concerns/renders_notes.rb +++ b/app/controllers/concerns/renders_notes.rb @@ -16,7 +16,7 @@ module RendersNotes private def preload_max_access_for_authors(notes, project) - return nil unless project + return unless project user_ids = notes.map(&:author_id) project.team.max_member_access_for_user_ids(user_ids) -- cgit v1.2.1