validates_presence_of
エラー出力
<% if @hoge.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@hoge.errors.count, "error") %> prohibited this hoge from being saved:</h2>
<ul>
<% @hoge.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>