# Add access to reviews/ratings to the product model
Spree::Product.class_eval do
  has_many :reviews

  def stars
    avg_rating.round
  end
end

# Add access to reviews/ratings to the product model
Spree::Product.class_eval do
  has_many :reviews

  attr_accessible :avg_rating, :reviews_count

  def stars
    avg_rating.round
  end
end

Fix for Rails security update. Need to make those attributes accessible
Fix for Rails security update. Need to make those attributes accessible
