Sha256: d54def4f22c23bb11063353bc0ff1368df5a572ad3c8de7ef029f84a6745de73
Contents?: true
Size: 342 Bytes
Versions: 3
Compression:
Stored size: 342 Bytes
Contents
module ReviewsHelper def star(the_class) "<span class=\"#{the_class}\"> ✮ </span>" 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 = I18n.t('star', :count => n) res += ' ' + t('out_of_5') if show_out_of res end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
spree_reviews-0.50.1 | app/helpers/reviews_helper.rb |
spree_reviews-0.50.0 | app/helpers/reviews_helper.rb |
spree_reviews-0.30.0 | app/helpers/reviews_helper.rb |