Files
growstuff/app/views/posts/_form.html.haml
2013-01-13 20:57:28 +11:00

20 lines
459 B
Plaintext

= form_for @post do |f|
- if @post.errors.any?
#error_explanation
%h2= "#{pluralize(@post.errors.count, "error")} prohibited this post from being saved:"
%ul
- @post.errors.full_messages.each do |msg|
%li= msg
.field
= f.label :author_id
= f.number_field :author_id
.field
= f.label :subject
= f.text_field :subject
.field
= f.label :body
= f.text_area :body
.actions
= f.submit 'Save'