Use nested form to access restful route create method?

im trying to create a relationship between products and their
categories. There is a :through join table called classifications.
eg
categories - classifications - products

from the products page i would like to access the destroy and create
methods of the classifications controller to ‘add products to a
category’.

I am able to access the destroy method through the :method => delete
eg
link_to ‘Remove’, classification_path(category, p), :method => :delete

Though i have realised that i have 2 choices for the create side of
this. Either have the link pointing to new then redirect to create from
the controller. Or even move the create logic to the new method.

or

I could embed the form_for into the

    and have it work without
    changing the controller methods. Also, this is just theory for the
    embedding the form, i have not tried it yet. Not sure if it can be done.

    Suggestions?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs