Railsでのajaxで部分テンプレートをする時にserver errorが出て、解決できなくて困っています><
コメントフォームに入力し非同期で更新させる部分は動くのですが...
.html.haml
.comment_content = render partial: 'comment', collection: @comments
.js.erb
$('#content').val(''); $('.comment_content').html("<%= j(render partial: 'prototypes/comment', collection: @comments) %>");
非同期でボタンが押されると部分点テンプレートを再描画させるところがうまくいかないですヽ(´o`;
.html.haml
.like_button = render partial: 'prototypes/like'
.js.erb
$('.like_button').html("<%= j(render partial: 'prototypes/like') %>");
回答1件
あなたの回答
tips
プレビュー