Sha256: 9621ce33548dede7d04578525b98ae60910d2ee036767dda721cc71f05063408
Contents?: true
Size: 368 Bytes
Versions: 3
Compression:
Stored size: 368 Bytes
Contents
module Spree::ReviewsHelper def star(the_class) content_tag(:span, " ✮ ".html_safe, :class => the_class) end def mk_stars(m) (1..5).collect {|n| n <= m ? star("lit") : star("unlit") }.join end def txt_stars(n, show_out_of = true) res = Spree.t('star', :count => n) res += " #{Spree.t('out_of_5')}" if show_out_of res end end
Version data entries
3 entries across 3 versions & 2 rubygems