= form_for @document do |f|
  - if @document.errors.any?
    #error_explanation
      %h2= "#{pluralize(@document.errors.count, "error")} prohibited this document from being saved:"
      %ul
        - @document.errors.full_messages.each do |msg|
          %li= msg

  .field
    = f.label :title
    = f.text_area :title
  .field
    = f.label :form_content, "Content"
    = f.text_area :form_content
  .field
    = f.label :shared
    = f.check_box :shared
  .actions
    = f.submit 'Save'

= form_for @document do |f|
  - if @document.errors.any?
    #error_explanation
      %h2= "#{pluralize(@document.errors.count, "error")} prohibited this document from being saved:"
      %ul
        - @document.errors.full_messages.each do |msg|
          %li= msg

  .field
    = f.label :title
    = f.text_field :title
  .field
    = f.label :form_content, "Content"
    = f.text_area :form_content
  .field
    = f.label :shared
    = f.check_box :shared
  .actions
    = f.submit 'Save'

Document title can be a text field in the form
Document title can be a text field in the form
