bootcamp/app/views/reviews/new.html.erb
2023-09-26 12:46:31 -05:00

17 lines
452 B
Plaintext

<h1>New Review for <%= link_to @movie.title, @movie %></h1>
<%= form_with(model: [@movie, @review]) do |f| %>
<%= render "shared/errors", object: @review %>
<%= f.label :name %>
<%= f.text_field :name, autofocus: true %>
<%= f.label :stars %>
<%= f.select :stars, [1, 2, 3, 4, 5], prompt: "Pick one" %>
<%= f.label :comment %>
<%= f.text_area :comment, placeholder: "What did you think?" %>
<%= f.submit "Post Review" %>
<% end %>