Let’s pretend that table1 is a BlogPosting, table3 is a Category, and table2 is a BlogPosting_Category (aka an association table between the two former)
I would recommend doing it "one item at a time", instead of bulk, as this is probably what your users will do anyways.
Have a list of associated categories on the BlogPosting form page, with a delete button for each category
Have a form field on the BlogPosting form page where you can add an associated category
Then you can add or delete an association one at a time. These should point to methods on the BlogPosting controller, such as AddCategory or DeleteCategory. You’ll have to pass the BlogPosting ID and the Category ID to the controllers.
You can’t generate CRUD operations for BlogPosting_Category, but you don’t really want to. All you need is the model for adding and deleting them ActiveRecord way.
As you are doing something of more and more simple, I advice you just to read the code and the sample and to copy only the needed parts.
Try at least to start something on your own, if you will need further support I will be glad to help you, but as you are at the "green field" status is a bit difficoult to give you an actual help.