You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm ordering only a selection of a master list, and storing the selection and its position in a different model (i.e., Master and Copy, and I want Copy ordered).
The easiest way I've found to achieve this is to let ranked-model do the initial ordering (i.e., no AJAX, just the JQueryUI.sortable list in the form). It works perfectly for create, and I think it'd work okay for updating too if I can find a way to re-save the positions on update (again, without AJAX). And, to complicate things further, entries in the selection can be changed, effectively deleting one ordering integer from the initial order, because it's stored on a relationship table.
I've tried resetting the positions on update in the controller to no avail:
I'm ordering only a selection of a master list, and storing the selection and its position in a different model (i.e.,
Master
andCopy
, and I wantCopy
ordered).The easiest way I've found to achieve this is to let
ranked-model
do the initial ordering (i.e., no AJAX, just theJQueryUI.sortable
list in the form). It works perfectly for create, and I think it'd work okay for updating too if I can find a way to re-save the positions on update (again, without AJAX). And, to complicate things further, entries in the selection can be changed, effectively deleting one ordering integer from the initial order, because it's stored on a relationship table.I've tried resetting the positions on update in the controller to no avail:
However, deleting the copies on update and resetting them like so achieves the desired result:
Any ideas how to achieve what I'm after? Perhaps its out of scope for this gem, which is a shame because otherwise it's perfect.
To ask the this question in the most basic form: how is the order created? Can it be replicated for update?
The text was updated successfully, but these errors were encountered: