From 1c2886debb93f10b0d0eb3ebc66fb8531b3ffb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sun, 18 Oct 2020 13:37:34 +0200 Subject: [PATCH] Remove redundant condition The association `organization.user` returns `nil` when the user is hidden. This was discovered thanks to the `Style/AndOr` rule. We were using `and` and `||` on the same line, which is confusing. --- app/views/admin/organizations/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/organizations/index.html.erb b/app/views/admin/organizations/index.html.erb index fb1dd0a58..c320087e8 100644 --- a/app/views/admin/organizations/index.html.erb +++ b/app/views/admin/organizations/index.html.erb @@ -22,7 +22,7 @@ <% @organizations.each do |organization| %> - <% hidden += 1 and next if organization.user.nil? || organization.user.hidden? %> + <% hidden += 1 and next if organization.user.nil? %> <%= organization.name %> <%= organization.email %>