19 lines
468 B
Plaintext
19 lines
468 B
Plaintext
= form_for @comment do |f|
|
|
- if @comment.errors.any?
|
|
#error_explanation
|
|
h2 = "#{pluralize(@comment.errors.count, "error")} prohibited this comment from being saved:"
|
|
ul
|
|
- @comment.errors.full_messages.each do |message|
|
|
li = message
|
|
|
|
.field
|
|
= f.label :user_id
|
|
= f.number_field :user_id
|
|
.field
|
|
= f.label :post_id
|
|
= f.number_field :post_id
|
|
.field
|
|
= f.label :body
|
|
= f.text_area :body
|
|
.actions = f.submit
|