<% if flash[:notice] %> Danbooru.Utility.notice("<%= j flash[:notice] %>"); <% end %> $(function() { let $comment = $("article#comment_<%= @comment_vote.comment_id %>").get(0); let html = "<%= j render_comment(@comment_vote.comment, current_user: CurrentUser.user) %>"; Alpine.morph($comment, html); });