I have two tables that have a HABTM relationship: Teacher has_and_belongs_to_many Groups, and Group has_and_belongs_to_many Teachers. This is what I want: select a Teacher, and then drag Groups from one box to another to assign them to the teacher. Or, select a group, and drag and drop Teachers to assign them to groups. All using AJAX, (off course). Only problem is, I don't know even know where to start. Should I create a controller, a scaffold, or what-have-you??? Please help me!
on 2006-03-25 14:25
on 2006-03-26 00:47
My advice is to learn to crawl before you try to go ride the bike you have in mind.... Start with something simpler, such as just setting up the teachers table and it's associated CRUD, then work from there. You could generate a scaffold for that, just to get a rough idea how rails likes to hand data entry, reading, updating and deletion. Don't worry about the ajax stuff until you can do it all manually without the ajax.