<div class="block">
  <div class="content">
    <%= controls do |c|
      c.item "Edit Page", edit_page_path(page), :icon => "edit_page"
    end %>
    <h2 class="title">
      <%= page.name %>
      <div class="highlighted-title-info-grey"><%= page.content_type %></div>
    </h2>
    <div class="inner">
      <div class="body">
        <% cache("page.#{page.id}-#{page.updated_at}.formatted_body") do %>
          <%= format_text page.body if page.body %>
        <% end %>
      </div>
    </div>
  </div>
</div>

<div class="block">
  <div class="content">
    <h2 class="title">Facts</h2>
    <div class="inner">
      <% page.facts.each do |fact| %>
        <div class="fact" id="fact_<%= fact.id %>">
          <%= render partial: "facts/fact", locals: { page: page, fact: fact } %>
        </div>
      <% end %>
      <div class="new_fact_button">
        <a href="#"><%= image_tag("icons/16x16/add.png") %> Add a Fact</a>
      </div>
      <div class="fact" id="new_fact" style="display: none">
        <%= render partial: "facts/form", locals: { page: page, fact: Fact.new } %>
      </div>
      <div class="clear"></div>
    </div>
  </div>
</div>

<div class="block">
  <div class="content">
    <%= controls do |c|
      c.item "Edit Page", edit_page_path(page), :icon => "edit_page"
    end %>
    <h2 class="title">
      <%= page.name %>
      <div class="highlighted-title-info-grey"><%= page.content_type %></div>
    </h2>
    <div class="inner">
      <div class="body">
        <%= format_text page.body if page.body %>
      </div>
    </div>
  </div>
</div>

<div class="block">
  <div class="content">
    <h2 class="title">Facts</h2>
    <div class="inner">
      <% page.facts.each do |fact| %>
        <div class="fact" id="fact_<%= fact.id %>">
          <%= render partial: "facts/fact", locals: { page: page, fact: fact } %>
        </div>
      <% end %>
      <div class="new_fact_button">
        <a href="#"><%= image_tag("icons/16x16/add.png") %> Add a Fact</a>
      </div>
      <div class="fact" id="new_fact" style="display: none">
        <%= render partial: "facts/form", locals: { page: page, fact: Fact.new } %>
      </div>
      <div class="clear"></div>
    </div>
  </div>
</div>

Drop caching until it can be done reliably. Linked pages don't update their link state when a new page is created.
Drop caching until it can be done reliably. Linked pages don't update their link state when a new page is created.
