# Ajax Render Problems on Update

**URL:** <https://www.ruby-forum.com/t/ajax-render-problems-on-update/128970>\
**Category:** Rails\
**Created:** [February 13, 2008, 2:41am UTC](https://www.ruby-forum.com/t/ajax-render-problems-on-update/128970 "2008-02-13T02:41:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8c91f0/32.png) [@Glen](https://www.ruby-forum.com/u/Glen)\
**Post date:** [February 13, 2008, 2:41am UTC](https://www.ruby-forum.com/t/ajax-render-problems-on-update/128970/1 "2008-02-13T02:41:03Z")

</div>

After submitting a post via an Ajax form the update on the div is  
rendered completely wrong. A simple reload of the page fixes the  
render but that is in no way acceptable. Does anyone have any idea  
what would be causing this?

Here is the render call:

```
  render :partial => "conversations/post", :layout => false

```

I’ve tried it with the layout and without, it has absolutely no  
effect.

Here is “conversations/post”:

 \<% for post in @posts %\> 

```
              <td class="message">
                  <% if post.title %>
                      <b><%=h post.title %></b><br /><br/>
                  <% end %>
              </td>
          </tr>
    <tr>
      <td>

      </td>
      <td style="text-align: left;">
        <%=h post.body %>
      </td>
    </tr>
    <% end %>
  <tr>
    <div id="new_post">
      <%= link_to_remote 'New Post',
              :url => new_forum_post_url(:id => @conversation.id),
              :update => 'new_post' %>
    </div>
  </tr>
  </tbody>
</table>

```

```
<div id="forum_ads">
    More Ad Sense would go here
</div>

<br />

```

```
<br />
<br />

<%= link_to 'Back', :controller => 'forums', :action =>

```

‘show’, :id =\> session[:forum] %\>

| \<%=h User.find(post.user\_id).login %\>  
 Posts: \<%=h User.find(post.user\_id).num\_posts %\> |
