Reset new_comment form

This commit is contained in:
Rei
2014-02-28 19:31:46 +08:00
parent 58d7d57a4c
commit 94438c2283

View File

@@ -1,4 +1,6 @@
<% if @comment.errors.empty? %>
$('#comments-for-<%= @comment.commentable_type.downcase %>-<%= @comment.commentable_id %>').append('<%= j render @comment %>').find('.empty-message').remove();
$('#new_comment textarea').val('');
$('#new_comment .preview').val('');
$('#new_comment [data-toggle="tab"]:first').tab('show');
<% end %>