Skip to content

Instantly share code, notes, and snippets.

@uokesita
Created January 14, 2011 05:37
Show Gist options
  • Save uokesita/779224 to your computer and use it in GitHub Desktop.
Save uokesita/779224 to your computer and use it in GitHub Desktop.
-if target.errors.any?
#errorExplanation
%h2= "#{pluralize(target.errors.count, "error")} prohibited this #{target.class.name.underscore.humanize.downcase} from being saved:"
%ul
- target.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