<% if @comment.parent_id == nil %> $('#comments .form_place').html("<%= escape_javascript(render(:partial => "form"))%>"); <% else %> $('#comment_<%= @comment.parent_id %>').children(".child_comments").children(".child_form_place").html("<%= escape_javascript(render(:partial => "form"))%>"); <% end %> //$(".add_comment").hide();