app/views/comments/update.js.haml
- id = dom_id(@comment)
- if @comment.errors.empty?
$('##{id}').replaceWith('#{ j render(partial: "comment", collection: [ @comment ]) }');
$('##{id}').effect("highlight", { duration:1500 });
- else
$('##{id}').html('#{ j render(partial: "edit") }');
$('#comment_comment').focus();