0
我正在嘗試使用AJAX顯示評論和表單以創建新評論的列表。所述simple_form_for塊提供了以下錯誤: 引發ArgumentError在DeliveryNegotiations#表明 顯示/home/action/socialpost/app/views/delivery_negotiations/show.js.erb其中行#10提出: 缺少塊js.erb文件中的simple_form_for標記中缺少塊錯誤
這是show.js.erb文件:
$("#conversation").html(
'<% @comments.each do |com| %> \
<strong> <%=j "User " + com.author_id.to_s + ":" %> </strong> \
<%=j (com.comment || " ") %> \
<br/> \
<% end %> \
<fieldset> \
<legend> \
New comment \
</legend> \
<%=j form_for ([@delivery_request, @delivery_negotiation, @comment]) do |builder| %> \
<%=j builder.text_area :comment %> \
<%=j builder.hidden_field :author_id, value: current_user.id %> \
<%=j builder.submit %> \
<% end %> \
</fieldset>\
');
任何幫助將不勝感激。