干杯! 我在我的 Rails 项目中有远程操作,例如:
def foo
respond_to do |format|
format.js {}
end
end
某处视野:
= link_to "foo", foo_path, remote: true
在我的 foo.js.erb 文件中:
$('#bar').html("<%= j render(partial: 'bar') %>");
在我的 _bar.html.haml 部分:
hello, i am bar
一切都很好并且运行良好,但是Missing template
当我在这条路线上刷新页面时它会返回错误。有什么问题?