当重写为slim时,下面的js.erb模板会是什么样子?
'<%= form_for(@question) do |f| %>'
$('.option-partial').html("<%= j render(partial: @question_type, locals: {f: f}) %>");
'<% end %>'
答案 0 :(得分:0)
| '
= form_for(@question) do |f|
| ' $('.option-partial').html("
= j render(partial: @question_type, locals: {f: f})
| "); '
| '
访问http://erb2slim.com/获取更多帮助