Created
December 5, 2012 03:18
-
-
Save D3MZ/4211879 to your computer and use it in GitHub Desktop.
More HAML goodness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if @user.errors.any? %> | |
<div id="error_explanation"> | |
<div class="alert alert-error"> | |
The form contains <%= pluralize(@user.errors.count, "error") %>. | |
</div> | |
<ul> | |
<% @user.errors.full_messages.each do |msg| %> | |
<li>* <%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=if @user.errors.any? | |
#error_explanation | |
.alert.alert-error | |
==the form contains #{pluralize(@user.errors.count, "error")} | |
%ul | |
[email protected]_messages.each do |msg| | |
%li * #{msg} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment