The problem is when you drag&drop, it does post to the action, but
the passed parameters are :id, which is @item.id, characteristic.id
is nowhere to be found. I’m assuming there is an issue with the
routes not passing the additional parameter.
The problem is when you drag&drop, it does post to the action, but
the passed parameters are :id, which is @item.id, characteristic.id
is nowhere to be found. I’m assuming there is an issue with the
routes not passing the additional parameter.
You are right – because the route isn’t nested, the URL and path
helpers have no knowledge about passing on other variables. This is not
to say that I recommend nesting the resource, because that wouldn’t seem
to reflect reality.
What you can always do is post additional variables by using the
old-school { :controller, :action, :var1, :var2, :varx } hash (which in
no violates RESTfulness) or simply name the drag & drop element as
“characteristic_id” and do a quick @characteristic =
Characteristic.new(params[:characteristic_id]) in your controller.