Using best_in_place in a table rails 5

0 votes
asked Sep 11, 2017 by john-wailer-cata%c3%

am currently using best_in_place gem in a nested resource model, but am not able to figure out what am doing wrong.

Here the error:

undefined method `invoice_detail_path' for #<#
<Class:0x007f09867ac588>:0x007f0984ac8818>
Did you mean?  invoice_type_path

application.js

//= require jquery
//= require best_in_place

invoice_details.coffee

$(document).ready ->
jQuery('.best_in_place').best_in_place()
return

invoices/show.html.erb

<% @invoice.invoice_details.each do |invoice_detail| %>
<td><%= invoice_detail.product.name if invoice_detail.product %></td>
<td><%= number_to_currency invoice_detail.product.outbound_price if 
     invoice_detail.product %></td>
<td><%= best_in_place invoice_detail, :quantity %></td>
<td><%= number_to_currency invoice_detail.total_amt %></td>
<% end %>

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter

...