Rails Drag And Drop For Create/Edit Associations -


I have tried to find an answer for this, but I think there really is nothing visible.

I am using Rail 4 and I have an exercise model and a regular model which is through silk through exercise. Users have a list of routine and a list of exercises attached to them. It aims to include organizations that exercise to prepare a list of exercises that are regularly involved in organizing them to drag and drop them from the list of exercises. Therefore it will include two lists, a list of exercises of a user and the other is a list of exercises related to the current routine. I want to make it so that they can either edit it or either pull it from the list for initial construction.

Can I drag and drop to work between lists? I confuse how to update the database with the change. Do the tracks realize that the user removed one thing from the list and should delete that record? Should every organization in the list be tried every time because of an error?

I am also in the form of part of the editing process inside the regular controller, because it is logical that it is understood to do so. Also, would it be better to call an AJAX call, which update every time or wait for all the changes and press a submit button to make a real update?

I can see how it wants to work in my head, but how to touch me Any help is appreciated.

Rails can not be dragged and drops: you need to use some sort of javascript library like JQuery

There is a railcast on this topic:

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -