0
我想在.html函數中添加文本/正文/紅寶石代碼,但每當我嘗試使用回車鍵正確對齊我的文本時,它都無法正常運行。js文件中的MultiLine Html代碼:Ruby on Rails
$('div.showcomment').html('<% @comments.each do |comment| %><%= comment.body %><%= link_to 'Delete Comment', articles_deletecomment_path(:id =>comment.id ,:articleid=>@article.id), method: :delete, :remote => true,data: { confirm: 'Are you sure?' } %><a onClick="editComment(<%= comment.id%>)">Edit Comment</a></br><% end %>');
我怎樣才能改變這種代碼,以便它可以擴展到多個行更好的可讀性