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.
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @organizations.each do |organization| %>
|
<% @organizations.each do |organization| %>
|
||||||
<% hidden += 1 and next if organization.user.nil? || organization.user.hidden? %>
|
<% hidden += 1 and next if organization.user.nil? %>
|
||||||
<tr id="<%= dom_id(organization) %>">
|
<tr id="<%= dom_id(organization) %>">
|
||||||
<td><%= organization.name %></td>
|
<td><%= organization.name %></td>
|
||||||
<td><%= organization.email %></td>
|
<td><%= organization.email %></td>
|
||||||
|
|||||||
Reference in New Issue
Block a user