erb/videos/_form.html.erb
<%= form_for(@video) do |f| %>
<% if @video.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@video.errors.count, "error") %> prohibited this video from being saved:</h2>
<ul>
<% @video.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :title %><br>
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :year %><br>
<%= f.number_field :year %>
</div>
<div class="field">
<%= f.label :link %><br>
<%= f.text_field :link %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>