Closed evalentini closed 11 years ago
rails returns the error messages after calling .errors.full_messages method. So:
<%= render 'shared/error_messages', object: f.object %>
and we'll make a partial:
<% if object.errors.any? %>
<div id="error_explanation">
<div class="alert alert-error">
The form contains <%= pluralize(object.errors.count, "error") %>.
</div>
<ul>
<% object.errors.full_messages.each do |msg| %>
<li>* <%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
(I'll add this code once I get through this psql issue)
An error bar should display at the top of the login page when a user tries to login with invalid credentials. Currently user is redirected to the login page with no explanation provided.