residency/app/views/stories/_form.html.haml

23 lines
526 B
Plaintext
Raw Normal View History

2023-01-11 17:48:06 +01:00
= 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'