我得到模板缺少錯誤,不知道爲什麼。我嘗試了幾件事情,但無法找到原因。最初,我是直接通過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