lib/comparison/presenter.rb
##
# Returns the I18n translation for `comparison.icons`. (See also #arrow.)
#
# This method is intended to display a graphical representation of the
# comparison. Typically this would be an arrow pointing up or down.
#
# No default implementation is included. You must provide the translations
# yourself or you will get missing translations.
#
# For example, to generate up and down arrows using Glyphicons included
# with Bootstrap, you could add the following translations to your
# application:
#
#     en:
#       comparison:
#         icons:
#           positive_html: '<span class="glyphicon glyphicon-arrow-up"></span>'
#           negative_html: '<span class="glyphicon glyphicon-arrow-down"></span>'
#           nochange_html: '<span class="glyphicon glyphicon-minus"></span>'
#
Returns the I18n translation for `comparison.icons`. (See also #arrow.)
This method is intended to display a graphical representation of the
comparison. Typically this would be an arrow pointing up or down.

No default implementation is included. You must provide the translations
yourself or you will get missing translations.

For example, to generate up and down arrows using Glyphicons included
with Bootstrap, you could add the following translations to your
application.


Returns the I18n translation for ` comparison . icons ` . ( See also #arrow . ) This method is intended to display a graphical representation of the comparison . Typically this would be an arrow pointing up or down . No default implementation is included . You must provide the translations yourself or you will get missing translations . For example to generate up and down arrows using Glyphicons included with Bootstrap you could add the following translations to your application .
def icon
      if positive?
        t 'comparison.icons.positive_html'
      elsif negative?
        t 'comparison.icons.negative_html'
      else
        t 'comparison.icons.nochange_html'
      end
    end
def icon if positive? t 'comparison.icons.positive_html' elsif negative? t 'comparison.icons.negative_html' else t 'comparison.icons.nochange_html' end end
Returns the I18n translation for `comparison.icons`.
Returns the I18n translation for ` comparison . icons ` .