title: make count in percentage by using counter_cache rails 4
body: <p><strong>I need to make votes_count in percentage</strong>.</p>
  
  <p>My relations are</p>
  
  <p>celebrity.rb</p>
  
  <pre><code>has_many :votes
  </code></pre>
  
  <p>vote.rb</p>
  
  <pre><code>belongs_to :celebrity, counter_cache: true
  </code></pre>
  
  <p>My controller </p>
  
  <pre><code>def show_celebrity
    @celebrity = Celebrity.includes(:category).where('category_id = ?', params[:id])
    @celebrity.each do |celeb|
      celeb["votes_count"] = celeb.votes.count
    end
    respond_to do |format|
      format.json { render json: @celebrity }
    end
  end
  </code></pre>
  
  <p>how can I make the votes_count in percentage? votes / total no. of votes *100 </p>