title: I'm using raty.js star rating system, how do I show the equivalent integer value of star for my avg. rating?
body: <p>The code below will show for example:</p>
  
  <p>Average Rating</p>
  
  <p>**</p>
  
  <p>Based on 2 reviews</p>
  
  <hr>
  
  <p>So since it's average rating is 2 stars, how do I show the integer value "2"? So it will be like:</p>
  
  <p>** 2</p>
  
  <pre><code>&lt;h2 class="avg-rating"&gt;Average Rating&lt;/h2&gt;
  &lt;div class="average-review-rating" data-score=&lt;%= @average_review %&gt;&gt;&lt;/div&gt;
  &lt;span class="number-of-reviews"&gt;Based on &lt;%= @book.reviews.count %&gt; reviews&lt;/span&gt;
  
  
  
  
  &lt;script&gt;
      $('.average-review-rating').raty({
          readOnly: true,
          path: '/assets/',
          score: function() {
              return $(this).attr('data-score')
          }
      });
  &lt;/script&gt;
  </code></pre>