parent
2e4e522c96
commit
c3fbb70cff
@ -1,2 +1,9 @@
|
||||
module ReviewsHelper
|
||||
def average_stars(movie)
|
||||
if movie.average_stars.zero?
|
||||
content_tag(:strong, "No reviews")
|
||||
else
|
||||
pluralize(number_with_precision(movie.average_stars, precision: 1) , "star")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in new issue