Fix haml-lint Rubocop Style/NumericPredicate cop (#26040)

This commit is contained in:
Matt Jankowski 2023-07-20 09:13:06 -04:00 committed by GitHub
parent 586b1c9dca
commit df05ece265
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -8,7 +8,7 @@
- poll.loaded_options.each_with_index do |option, index|
%li
- if show_results
- percent = total_votes_count > 0 ? 100 * option.votes_count / total_votes_count : 0
- percent = total_votes_count.positive? ? 100 * option.votes_count / total_votes_count : 0
%label.poll__option><
%span.poll__number><
= "#{percent.round}%"