renders error partial only if story has errors

* explicitly not calling valid? as this revalidates all stories
pull/6827/head
Jens Ulferts 12 years ago
parent 236a8c24e3
commit 92c83d6fca
  1. 2
      app/views/rb_stories/_story.html.erb

@ -16,6 +16,6 @@
<div class="fixed_version_id"><%= story.fixed_version_id %></div>
<div class="higher_item_id"><%= !defined?(higher_item) || higher_item.nil? ? '' : higher_item.id %></div>
<div class="meta">
<%= render :partial => "shared/model_errors", :object => story.errors %>
<%= render(:partial => "shared/model_errors", :object => story.errors) if story.errors.size > 0 %>
</div>
</li>

Loading…
Cancel
Save