title: Rails is rendering the html as plain text inside a pre element
body: <p>This is a bug I am only experiencing only in chrome and is only happening on a specific route - /dashboard/friends. The html is appearing as plain text, that is wrapped inside a </p>
  
  <pre><code>&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;
  </code></pre>
  
  <p>If I make any change to the contents of the files associated with the view like simply putting "blah" in the index.haml file it will then render properly. Anyone have any idea about what might be causing this?</p>
  
  <p>EDIT: this is what renders in the browser -</p>
  
  <pre><code>&lt;html&gt;
    &lt;head&gt;
    &lt;/head&gt;
      &lt;body&gt;
        &lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;
         "my apps view renders in here including the head and html, 
          but since it is in quotes, it just appears as plain text
          &lt;!DOCTYPE&gt;
          &lt;html&gt;
          entire rails app html here...
          &lt;/html&gt;"
  &lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>the bug seems to be related to the @invites variable I have in the controller, removing it fixes the issue -</p>
  
  <pre><code>class Dashboard::FriendsController &lt; Dashboard::BaseController
    def index
      @friends = current_user.friends
  #removing the @invites var fixes it, but I need those invitations...
      @invites = current_user.invitations.where(type: "FriendInvite").includes(:recipient)
    end
  end
  </code></pre>
  
  <p>In the index.haml</p>
  
  <pre><code>%header.page-hdr
    %h1
      Friends
    %ul
      %li
        = link_to dashboard_find_friend_path, class: "btn" do
          .fa.fa-plus
          Add a Friend
  .row
    - if @friends.empty?
      You have no friends
    - else
      - @friends.each do |friend|
        = render 'friend', friend: friend
    - if @invites.present?
      %h2 
        Invited
      - @invites.each do |inv|
        = render partial: 'invite', locals: {inv: inv}
  </code></pre>
  
  <p>This is the layout.haml - </p>
  
  <pre><code>!!! 5
  %html
    %head
      %title= full_title(yield(:title))
      = stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" =&gt; true 
      = javascript_include_tag "application", "data-turbolinks-track" =&gt; true 
      = csrf_meta_tags 
      = favicon_link_tag '/favicon.ico'
      = favicon_link_tag '/favicon.png', rel: 'apple-touch-icon', type: 'image/png'
      %script{ type: "text/javascript", src: "//use.typekit.net/gey0efl.js" }
      %script{ type: "text/javascript"}
        try{Typekit.load();}catch(e){}
    %body#dashboard-body    
  
      = render current_user.navigation
  
      #dashboard-wrapper
        = render "shared/dashboard/header"
        = yield
  </code></pre>
  
  <p>UPDATE: upgraded to Rails 4.1, no luck. Again only breaking in chrome, and only when I include that second instance variable AND, that variable has been modified in some way( new record added)</p>