Module: RatingsHelper

Defined in:
app/helpers/ratings_helper.rb

Overview

Ratings Helper

Instance Method Summary collapse

Instance Method Details

#display_rating(rating) ⇒ Object


5
6
7
8
9
10
# File 'app/helpers/ratings_helper.rb', line 5

def display_rating(rating)
  attributes = Rating::LIST.map do |attr|
    "#{attr.to_s.titlecase} #{format('%+d', rating.send(attr))}"
  end
  attributes.join(', ')
end