Files
brewery/app/views/ratings/new.html.erb
T

20 lines
527 B
ERB

<h2>Create new rating</h2>
<%= form_for(@rating) do |f| %>
<% if @rating.errors.any? %>
<div style="color: red">
<h2><%= pluralize(@rating.errors.count, "error") %> prohibited this user from being saved:</h2>
<ul>
<% @rating.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>
<%= f.select :beer_id, options_from_collection_for_select(@beers, :id, :to_s) %>
score: <%= f.number_field :score %>
<%= f.submit %>
<% end %>