mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-26 18:56:06 -04:00
20 lines
459 B
Plaintext
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'
|