anchor.diff:                    <td><%= rating.criterions.where(:name => "Headache").first.value %>/5</td>
                     <% @avg = rating.criterions.sum(:value)/3 %>
                     <td colspan="3">
  -                    <i class="icon-star<% if (@avg > 1) %><% elsif (@avg > 0.5)%>-half<% elsif (@avg <1) %>-empty<% end %>"></i>
  -                    <i class="icon-star<% if (@avg > 2) %><% elsif (@avg > 1.5)%>-half<% elsif (@avg <2) %>-empty<% end %>"></i>
  -                    <i class="icon-star<% if (@avg > 3) %><% elsif (@avg > 2.5)%>-half<% elsif (@avg <3) %>-empty<% end %>"></i>
  -                    <i class="icon-star<% if (@avg > 4) %><% elsif (@avg > 3.5)%>-half<% elsif (@avg <4) %>-empty<% end %>"></i>
  -                    <i class="icon-star<% if (@avg > 5) %><% elsif (@avg > 4.5)%>-half<% elsif (@avg <5) %>-empty<% end %>"></i>
  +                    <i class="icon-star<% if (@avg >= 1) %><% elsif (@avg > 0.5)%>-half<% elsif (@avg <1) %>-empty<% end %>"></i>
  +                    <i class="icon-star<% if (@avg >= 2) %><% elsif (@avg > 1.5)%>-half<% elsif (@avg <2) %>-empty<% end %>"></i>
  +                    <i class="icon-star<% if (@avg >= 3) %><% elsif (@avg > 2.5)%>-half<% elsif (@avg <3) %>-empty<% end %>"></i>
  +                    <i class="icon-star<% if (@avg >= 4) %><% elsif (@avg > 3.5)%>-half<% elsif (@avg <4) %>-empty<% end %>"></i>
  +                    <i class="icon-star<% if (@avg >= 5) %><% elsif (@avg > 4.5)%>-half<% elsif (@avg <5) %>-empty<% end %>"></i>
                     </td>
                     <% if rating.comment.length > 15 %>
                         <td colspan="4"><%= rating.comment.slice!(0..15) %>...</td>
  
positive.code:                               <td><%= @ratings3.where(:beers => {id: rating.beer_id}).first.avgheadache %>/5</td>
                                <% @avg = @ratings4.where(:beers => {id: rating.beer_id}).first.overall %>
                                <td>
                                  <i class="icon-star<% if (@avg > 1) %><% elsif (@avg > 0.5)%>-half<% elsif (@avg <1) %>-empty<% end %>"></i>
                                  <i class="icon-star<% if (@avg > 2) %><% elsif (@avg > 1.5)%>-half<% elsif (@avg <2) %>-empty<% end %>"></i>
                                  <i class="icon-star<% if (@avg > 3) %><% elsif (@avg > 2.5)%>-half<% elsif (@avg <3) %>-empty<% end %>"></i>
                                  <i class="icon-star<% if (@avg > 4) %><% elsif (@avg > 3.5)%>-half<% elsif (@avg <4) %>-empty<% end %>"></i>
                                  <i class="icon-star<% if (@avg > 5) %><% elsif (@avg > 4.5)%>-half<% elsif (@avg <5) %>-empty<% end %>"></i>
                                </td>
                                <td><%= link_to 'All Ratings', ratings_path(:beer_id => rating.beer.id) %></td>
                      </tr>
  
negative.code:                           <td><%= @ratings3.where(:beers => {id: rating.beer_id}).first.avgheadache %>/5</td>
                            <% @avg = @ratings4.where(:beers => {id: rating.beer_id}).first.overall %>
                            <td>
                              <i class="icon-star<% if (@avg >= 1) %><% elsif (@avg > 0.5)%>-half<% elsif (@avg <1) %>-empty<% end %>"></i>
                              <i class="icon-star<% if (@avg >= 2) %><% elsif (@avg > 1.5)%>-half<% elsif (@avg <2) %>-empty<% end %>"></i>
                              <i class="icon-star<% if (@avg >= 3) %><% elsif (@avg > 2.5)%>-half<% elsif (@avg <3) %>-empty<% end %>"></i>
                              <i class="icon-star<% if (@avg >= 4) %><% elsif (@avg > 3.5)%>-half<% elsif (@avg <4) %>-empty<% end %>"></i>
                              <i class="icon-star<% if (@avg >= 5) %><% elsif (@avg > 4.5)%>-half<% elsif (@avg <5) %>-empty<% end %>"></i>
                            </td>
                            <td><%= link_to 'All Ratings', ratings_path(:beer_id => rating.beer.id) %></td>
                      </tr>
  