%h1= @document.title
%ol
  - @document.top_level_paragraphs.each do |paragraph|
    = render paragraph
- if @document.top_level_paragraphs.empty?
  .insert_paragraph_wrapper
    %p.control
      = link_to "Insert paragraph", new_document_paragraph_path(:document_id => @document), :class => 'insert_paragraph'
    .insert_paragraph_form{:style => "display: none;"}
      = form_for :paragraph do |f|
        = render(:partial => 'paragraphs/form', :locals => {:f => f, :cancel_link => true})
  

%p
  = link_to "Back to documents list.", documents_path
%h1= @document.title
%ol
  - @document.top_level_paragraphs.each do |paragraph|
    = render paragraph
- if @document.top_level_paragraphs.empty?
  .insert_paragraph_wrapper
    %p.control
      = link_to "Insert paragraph", new_document_paragraph_path(:document_id => @document), :class => 'insert_paragraph'
    .insert_paragraph_form{:style => "display: none;"}
      = form_for :paragraph, :url => document_paragraphs_path(:document_id => @document) do |f|
        = render(:partial => 'paragraphs/form', :locals => {:f => f, :cancel_link => true})
  

%p
  = link_to "Back to documents list.", documents_path
Fix that initial new paragraph form had wrong action URL.
Fix that initial new paragraph form had wrong action URL.
