Sha256: 758f0559f892f6e81b8492027e7726937a6bf5bd5bc025d7b1b3e8e579720947

Contents?: true

Size: 255 Bytes

Versions: 5

Compression:

Stored size: 255 Bytes

Contents

module ReviewsHelper
  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

5 entries across 5 versions & 1 rubygems

Version Path
spree_reviews_rating-0.70.7.1 app/helpers/reviews_helper.rb
spree_reviews_rating-0.70.7 app/helpers/reviews_helper.rb
spree_reviews_rating-0.70.6.1 app/helpers/reviews_helper.rb
spree_reviews_rating-0.70.6 app/helpers/reviews_helper.rb
spree_reviews_rating-0.70.5 app/helpers/reviews_helper.rb