Strange partial

I am struggling with a strange effect when using two partials
This is show.html.erb
   <div>
     <h2>posts commented on by <%= @user.login %></h2>
     <%= render :partial => @posts_commented_on %>
     <h2>Posts submitted by <%= @user.login %></h2>
     <%= render :partial => @posts_submitted %>
   </div>

This is the relevant bit of users.html.erb
   <div id="useryield">
     <%= yield %>
   </div>

This is from users_controller.rb
   def show
    @user = User.find(params[:id])
    @posts_submitted = @user.posts.find(:all,
        :limit => 6, :order => 'posts.id DESC')
    @posts_commented_on = @user.posts_commented_on.find(:all,
        :limit => 2, :order => 'comments.id DESC')
   end

Can anybody tell me where the div, that splits submitted from comments,
appears from?

Attachments:
http://www.ruby-forum.com/attachment/4737/Screenshot.png

Can anybody tell me where the div, that splits submitted from comments,
appears from?

What does the post partial & generated html look like ? Could you have
forgotten to close a tag or something like that ?

Fred

Frederick Cheung wrote:

Can anybody tell me where the div, that splits submitted from comments,
appears from?

What does the post partial & generated html look like ? Could you have
forgotten to close a tag or something like that ?

Fred

Hope this helps

I've attached the generated html.
The partials are defined in this extract from user_controller.rb
def show
    @user = User.find(params[:id])
    @posts_submitted = @user.posts.find(:all,
        :limit => 6, :order => 'posts.id DESC')
    @posts_commented_on = @user.posts_commented_on.find(:all,
        :limit => 2, :order => 'comments.id DESC')
  end
How can it create a div in the middle of a find operation?

Attachments:
http://www.ruby-forum.com/attachment/4739/index.html.erb

Let's look at the first post from that

<h2>posts commented on by gleb</h2>
<div class="post" id="post_6">
  <h3><a href="/posts/6">Nathan's tail</a></h3>
  <p class="content">
    Hi, I am a dog. Woof,woof
  </p>
  <p class="new">

    <em>Please log in to place a comment.</em>
    <a href="/session/new">Login</a>

  </p>
</div>
<p>
  Submitted by: <a href="/users/4">rover</a>
</p>
</div>

You have one <div> tag and two </div> tags, which isn't balanced.
This appears to be consistent for each post.

I would guess you want that last closing div tag and not the one 4 lines above.

I suspect that this is in _post.html.erb

HTH

You were right, stupid of me. Thanks