23 lines
526 B
Plaintext
23 lines
526 B
Plaintext
= form_for @story do |f|
|
|
- if @story.errors.any?
|
|
#error_explanation
|
|
%h2= "#{pluralize(@story.errors.count, "error")} prohibited this story from being saved:"
|
|
%ul
|
|
- @story.errors.full_messages.each do |message|
|
|
%li= message
|
|
|
|
.field
|
|
= f.label :picture
|
|
= f.text_field :picture
|
|
.field
|
|
= f.label :header
|
|
= f.text_field :header
|
|
.field
|
|
= f.label :text
|
|
= f.text_area :text
|
|
.field
|
|
= f.label :happened
|
|
= f.date_field :happened
|
|
.actions
|
|
= f.submit 'Save'
|