<%= form_with(model: review, url: url, local: true) do |form| %>
  <% if review.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(review.errors.count, "error") %> prohibited this review from being saved:</h2>

      <ul>
        <% review.errors.full_messages.each do |message| %>
          <li><%= message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= form.label :cleanliness %>
    <%= form.number_field :cleanliness %>
  </div>

  <div class="field">
    <%= form.label :location %>
    <%= form.number_field :location %>
  </div>

  <div class="field">
    <%= form.label :wifi %>
    <%= form.number_field :wifi %>
  </div>

  <div class="field">
    <%= form.label :writing %>
    <%= form.number_field :writing %>
  </div>

  <div class="field">
    <%= form.label :traffic %>
    <%= form.number_field :traffic %>
  </div>

  <div class="field">
    <%= form.label :toilet_paper %>
    <%= form.number_field :toilet_paper %>
  </div>

  <div class="field">
    <%= form.label :overall %>
    <%= form.number_field :overall, required: true %>
  </div>

  <div class="field">
    <%= form.label :comments %>
    <%= form.text_area :comments, required: true, placeholder: "Required" %>
  </div>

  <div class="actions">
    <%= form.submit %>
  </div>
<% end %>

<%= form_with(model: review, url: url, local: true) do |form| %>
  <% if review.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(review.errors.count, "error") %> prohibited this review from being saved:</h2>

      <ul>
        <% review.errors.full_messages.each do |message| %>
          <li><%= message %></li>
        <% end %>
      </ul>
    </div>
  <% end %>

  <p>Your review is anonymous.</p>

  <dl>
    <% [:cleanliness, :location, :wifi, :writing, :traffic, :toilet_paper, :overall].each do |field| %>
      <dt><%= form.label field %></dt>
      <dd class="rating">
        <% unless field == :overall %>
          <label class="abstain">
            <%= form.radio_button field, "" %>
            N/A
          </label>
        <% end %>

        <% (1..5).reverse_each do |rating| %>
          <%= form.radio_button field, rating, class: "star", required: field == :overall %>
          <%= form.label field, rating, value: rating, class: "star" %>
        <% end %>
      </dd>
      </div>
    <% end %>
  </dl>

  <dl>
    <dt><%= form.label :comments %></dt>
    <dd><%= form.text_area :comments, required: true, placeholder: "Required" %></dd>
  </dl>

  <div class="actions">
    <%= form.submit %>
  </div>
<% end %>

Use rating stars on the review form.
Use rating stars on the review form.
