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:
parent
6ae36ea492
commit
17ce13d49e
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue