diff --git a/app/decorators/recipe_decorator.rb b/app/decorators/recipe_decorator.rb index 6b38bba..49de7d2 100644 --- a/app/decorators/recipe_decorator.rb +++ b/app/decorators/recipe_decorator.rb @@ -24,8 +24,4 @@ class RecipeDecorator < BaseDecorator end end - def average_rating - rating - end - end \ No newline at end of file diff --git a/app/views/recipes/index.html.erb b/app/views/recipes/index.html.erb index 8fbaa71..39f3674 100644 --- a/app/views/recipes/index.html.erb +++ b/app/views/recipes/index.html.erb @@ -33,8 +33,8 @@ <%= link_to recipe.short_name, recipe %> - <% if recipe.average_rating > 0 %> - <%= text_field_tag('rating', recipe.average_rating, disabled: true, data: {rating: true, size: '20px', interval: '0.25'}) %> + <% if recipe.rating %> + <%= text_field_tag('rating', recipe.rating, disabled: true, data: {rating: true, size: '20px', interval: '0.25'}) %> <% else %> -- <% end %>