lib/neutral/voting_builder/elements/span.rb in neutral-0.0.2 vs lib/neutral/voting_builder/elements/span.rb in neutral-0.0.3

- old
+ new

@@ -13,22 +13,22 @@ @total.nonzero? end class Positive < Span def to_s - content_tag :span, total, id: 'positive' + content_tag :span, total, class: 'positive' end end class Negative < Span def to_s - content_tag :span, total, id: 'negative' + content_tag :span, total, class: 'negative' end end class Difference < Span def to_s - content_tag :span, total.try(:abs), class: color, id: 'difference' + content_tag :span, total.try(:abs), class: "difference #{color}" end private def color total > 0 ? 'positive' : 'negative' if total