I have a ActiveRecord::Base
class Box
that has_many
Card
s model.
There are some cards in box show.html.erb
like this:
...
<% @cards.each do |card| %>
<%= best_in_place card, :front %>
<% end %>
...
I want to edit value by using best_in_place
, but it send request to BoxesController
not to CardsController
and ends up with error AbstractController::ActionNotFound - The action 'update' could not be found for BoxesController:
.
How can I specify a controller with best_in_place
?
you can specify a path like this:
<%= best_in_place detail, :price, :display_as => :mk_bal, :classes => 'price_bind', :path => purchase_detail_path(@purchase, detail)%>