Skip to content

Instantly share code, notes, and snippets.

@JonathanVeg
Created April 21, 2013 02:43
Show Gist options
  • Save JonathanVeg/5428253 to your computer and use it in GitHub Desktop.
Save JonathanVeg/5428253 to your computer and use it in GitHub Desktop.
= form_for @user2 do |f|
- if @user2.errors.any?
#error_explanation
%h2= "#{pluralize(@user2.errors.count, "error")} prohibited this user2 from being saved:"
%ul
- @user2.errors.full_messages.each do |msg|
%li= msg
.field
= f.label :nome
= f.text_field :nome
%br
= f.file_field :avatar
.actions
= f.submit 'Save'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment