我得到模板缺少错误,不知道为什么。我尝试了几件事情,但无法找到原因。最初,我是直接通过Ajax方法发送PARAMS和没有错误。我将它改为form_for。现在我收到这个错误。任何人都可以发现这里的错误吗?远程真不工作
我的代码是这样的。
<%= form_for(car,:format => :js,:method => :get, :remote => true, :class => "carformtag",:id=>"carformtag",:url => (conversion.comment_flag.present? ? converted_path : edit_converted_path), :validate => true) do |p|%>
<span class="ckbox ckbox-primary col-md-12" style="padding: 0px">
<%= p.check_box :reason_one, {:class => "reason_one history_checked_unchecked", :id => "reason_one"}, "true", "false" %>
<label for="reason_one">Collection not good</label>
</span>
<span class="col-md-12">
<%= p.submit "Submit", class: "btn btn-success", remote: true, 'data-disable-with' => "Please wait.."%>
</span>
<% end %>
Controller Code:
def converted
@recommend = Car.find(params[:id])
@prescription.update(update_params)
end