Skip to content

Commit

Permalink
Correct Lint/Void: Literal used in void context rubocop offence
Browse files Browse the repository at this point in the history
app/controllers/anonymous_feedback/problem_reports_controller.rb:78:11: W: Lint/Void: Literal true used in void context.
          true
          ^^^^
  • Loading branch information
AgaDufrat committed Jan 29, 2025
1 parent 6abcd47 commit 9cf43aa
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ def mark_supplied_reports_as_reviewed_and_spam

review_attrs = { reviewed: true, marked_as_spam: }

if problem_report.update(review_attrs)
true
else
false
end
problem_report.update(review_attrs) ? true : false

Check failure on line 77 in app/controllers/anonymous_feedback/problem_reports_controller.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Lint/Void: Literal `true` used in void context.
end
rescue ActiveRecord::RecordNotFound
false
Expand Down

0 comments on commit 9cf43aa

Please sign in to comment.