Add and apply Style/SoleNestedConditional rule

We were already applying it in most places.
This commit is contained in:
Javi Martín
2021-08-11 16:34:02 +02:00
parent aef1e4660f
commit 48672a3f35
2 changed files with 5 additions and 2 deletions

View File

@@ -517,6 +517,9 @@ Style/RedundantSelf:
Style/SafeNavigation:
Enabled: true
Style/SoleNestedConditional:
Enabled: true
Style/StringLiterals:
EnforcedStyle: double_quotes

View File

@@ -12,8 +12,8 @@ class CommentNotifier
private
def send_comment_email
unless @comment.commentable.is_a?(Legislation::Annotation)
Mailer.comment(@comment).deliver_later if email_on_comment?
if !@comment.commentable.is_a?(Legislation::Annotation) && email_on_comment?
Mailer.comment(@comment).deliver_later
end
end