move previewed/posted comment outside of <form>, fixes duplicate comment problem

a comment would get posted and then displayed inside the original
<form>.  when that comment would get edited, its <form> would be
nested inside the original one, and on webkit browsers, submitting
the inside form would submit the outside one.
This commit is contained in:
joshua stein 2012-09-04 11:33:49 -05:00
parent 6ae36ea492
commit 17ce13d49e

View file

@ -30,16 +30,15 @@
</div>
<p></p>
<% if defined?(show_comment) %>
<% if show_comment.valid? %>
<ol class="comments comments1 preview">
<%= render :partial => "comments/comment",
:locals => { :comment => show_comment, :story => story } %>
</ol>
<% else %>
<%= errors_for comment %>
<% end %>
<% end %>
<% if defined?(show_comment) %>
<% if show_comment.valid? %>
<ol class="comments comments1 preview">
<%= render :partial => "comments/comment",
:locals => { :comment => show_comment, :story => story } %>
</ol>
<% else %>
<%= errors_for comment %>
<% end %>
<% end %>
</div>