app/views/faqs/_form.html.haml
= form_for @faq do |f|
- if @faq.errors.any?
#error_explanation
%h2= "#{pluralize(@faq.errors.count, "error")} prohibited this faq from being saved:"
%ul
- @faq.errors.full_messages.each do |message|
%li= message
.form-group
= f.label :question
= f.text_field :question, class: 'form-control'
.form-group
= f.label :answer
= f.text_area :answer, placeholder: 'Add your answer, you can use markdown', class: 'form-control', rows: 10
.form-group
= f.submit 'Save'