Skip to content
Browse files

Model error messages when editing artefacts

  • Loading branch information...
1 parent 80b4ea1 commit 93c6e65e7ffe843bc92cd5c8da534e3ed60dab10 @JordanHatch JordanHatch committed
Showing with 8 additions and 0 deletions.
  1. +8 −0 app/views/artefacts/_form.html.erb
View
8 app/views/artefacts/_form.html.erb
@@ -2,6 +2,14 @@
<p class="flash-notice"><%= flash[:notice] %></p>
<% end %>
+<% if artefact.errors.count > 0 %>
+<ul class="flash-alert">
+ <% artefact.errors.full_messages.each do |message| %>
+ <li><%= message %></li>
+ <% end %>
+</ul>
+<% end %>
+
<div id="panopticon" class="ui-widget-content">
<%= semantic_form_for(artefact, :html => { :class => 'artefact' }) do |f| %>
<%= f.inputs :name => "Basic information" do %>

0 comments on commit 93c6e65

Please sign in to comment.
Something went wrong with that request. Please try again.