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":
<div id="thread_content">
<table>
<% for post in @posts %>
<tbody class="post">
<tr>
<td class="author">
<%=h User.find(post.user_id).login %><br />
Posts: <%=h User.find(post.user_id).num_posts %>
</td>
<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>
<div id="forum_ads">
More Ad Sense would go here
</div>
<br />
<!--
<div id="new_post">
<%= link_to_remote ''New Post'',
:url => new_forum_post_url(:id => @conversation.id),
:update => ''new_post'' %>
</div>
-->
<br />
<br />
<%= link_to ''Back'', :controller =>
''forums'', :action =>
''show'', :id => session[:forum] %>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---