Skip to content

Instantly share code, notes, and snippets.

@stonean
Created July 4, 2011 16:34
Show Gist options
  • Save stonean/1063586 to your computer and use it in GitHub Desktop.
Save stonean/1063586 to your computer and use it in GitHub Desktop.
Rails 3 error display
# shared/errors.slim
- if model.errors.any?
ul#errors
- model.errors.full_messages.each do |msg|
li = msg
# posts/new.html.slim
= render partial: "/shared/errors", locals: { model: @post }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment