Files
dunlop-ember/spec/dummy/app/views/posts/_form.html.slim
T
2017-12-21 11:36:52 +01:00

16 lines
385 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 |message|
li = message
.field
= f.label :title
= f.text_field :title
.field
= f.label :body
= f.text_area :body
.actions = f.submit