Fix haml-lint Rubocop Style/NumericPredicate
cop (#26040)
This commit is contained in:
parent
586b1c9dca
commit
df05ece265
3 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@
|
|||
.auto-dir
|
||||
= status_content_format(status)
|
||||
|
||||
- if status.ordered_media_attachments.size > 0
|
||||
- if status.ordered_media_attachments.size.positive?
|
||||
%p
|
||||
- status.ordered_media_attachments.each do |a|
|
||||
- if status.local?
|
||||
|
|
|
@ -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}%"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue