moved form errors to partial
This commit is contained in:
10
app/views/shared/_form_model_errors.html.erb
Normal file
10
app/views/shared/_form_model_errors.html.erb
Normal file
@ -0,0 +1,10 @@
|
||||
<% if flash[:error].present? %>
|
||||
<div class="error">
|
||||
<%= flash[:error] %>
|
||||
<p>
|
||||
<% obj.errors.messages.each do |k,v| %>
|
||||
<%= "#{k.to_s} #{v.join(' and ')}" %><br />
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
Reference in New Issue
Block a user