OSDN Git Service

t#30199:update i18n error caption
[pettanr/pettanr.git] / app / views / stories / _newform.html.erb
index f7b5749..7ec5e4a 100644 (file)
@@ -1,15 +1,5 @@
 <%= form_for(@story) do |f| %>
-  <% if @story.errors.any? %>
-    <div id="error_explanation">
-      <h2><%= pluralize(@story.errors.count, "error") %> prohibited this comic from being saved:</h2>
-
-      <ul>
-      <% @story.errors.full_messages.each do |msg| %>
-        <li><%= msg %></li>
-      <% end %>
-      </ul>
-    </div>
-  <% end %>
+  <%= render 'system/error_explanation', :obj => @story %>
 
   <div class="field">
     <%= f.number_field :comic_id %>