Created
November 16, 2012 00:25
-
-
Save jackhong/4082758 to your computer and use it in GitHub Desktop.
Replace error_messages for
This file contains 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
# @bob is the object binding to the form | |
-if @bob.errors.any? | |
#error_explanation | |
%h2= "#{pluralize(@bob.errors.count, "error")} prohibited this from being saved:" | |
%ul | |
- @bob.errors.full_messages.each do |msg| | |
%li= msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment