<commit_before><div class="container">
  <h1><%= @film.title %></h1>

<div id="review-list">

<p>Average Rating: <%= @film.avg_rating %></p>

<% if logged_in? && current_user.judge? %>
  <% if @film.ratings.where(user_id: current_user.id).length > 0  %>
    <p>Thank you for your rating</p>
  <% else %>
    <p>Rating</p>
    <%= form_for @rating do |f| %>
      <%= f.select(:score, Rating::JUDGE_SCORE) %>
      <%= f.hidden_field :user_id, :value => current_user.id %>
      <%= f.hidden_field :film_id, :value => @film.id %>
      <%= f.submit %>
    <% end %>
  <% end %>
<% elsif logged_in? && current_user.judge != true %>
  <% if @film.ratings.where(user_id: current_user.id).length > 0 %>
      <p>Thank you for your rating</p>
  <% else %>
    <p>Rating</p>
    <%= form_for @rating do |f| %>
      <%= f.select(:score, Rating::USER_SCORE) %>
      <%= f.hidden_field :user_id, :value => current_user.id %>
      <%= f.hidden_field :film_id, :value => @film.id %>
      <%= f.submit %>
    <% end %>
  <% end %>
<% end %>
  <% @film.reviews.each do |review| %>
    <%= render "/reviews/review_partial", review: review %>
  <% if logged_in? %>
    <%= link_to "Comment on this review", new_review_comment_path(review), class:"write-comment" %>
    <div class="comment-form-holder"></div>
  <% end %><br>
    <div class="comment-list">
      <% review.comments.each do |comment| %>
      <%= render "/comments/comment_partial", comment: comment, review: review %>
      <% end %>
    </div>
  <% end %>
</div>

<% if @film.reviews.empty? %><commit_msg>Revert "Add render partial to review"<commit_after><div class="container">
  <h1><%= @film.title %></h1>

<div id="review-list">

<p>Average Rating: <%= @film.avg_rating %></p>

<% if logged_in? && current_user.judge? %>
  <% if @film.ratings.where(user_id: current_user.id).length > 0  %>
    <p>Thank you for your rating</p>
  <% else %>
    <p>Rating</p>
    <%= form_for @rating do |f| %>
      <%= f.select(:score, Rating::JUDGE_SCORE) %>
      <%= f.hidden_field :user_id, :value => current_user.id %>
      <%= f.hidden_field :film_id, :value => @film.id %>
      <%= f.submit %>
    <% end %>
  <% end %>
<% elsif logged_in? && current_user.judge != true %>
  <% if @film.ratings.where(user_id: current_user.id).length > 0 %>
      <p>Thank you for your rating</p>
  <% else %>
    <p>Rating</p>
    <%= form_for @rating do |f| %>
      <%= f.select(:score, Rating::USER_SCORE) %>
      <%= f.hidden_field :user_id, :value => current_user.id %>
      <%= f.hidden_field :film_id, :value => @film.id %>
      <%= f.submit %>
    <% end %>
  <% end %>
<% end %>
  <% @film.reviews.each do |review| %>

  <% if logged_in? %>
    <%= link_to "Comment on this review", new_review_comment_path(review), class:"write-comment" %>
    <div class="comment-form-holder"></div>
  <% end %><br>
    <div class="comment-list">
      <% review.comments.each do |comment| %>
      <%= render "/comments/comment_partial", comment: comment, review: review %>
      <% end %>
    </div>
  <% end %>
</div>

<% if @film.reviews.empty? %>
{'fraction_non_alphanumeric': 0.21685575364667747, 'fraction_numerical': 0.002593192868719611, 'mean_word_length': 3.1201602136181577, 'pattern_counts': {'":': 0, '<': 108, '<?xml version=': 0, '>': 120, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4865690', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1120, 'n_words': 225}