Suppose that I’ve two controllers, “good” and “customer” and that I want add many goods to a single customer; in which way can I do this?
I mean, I need a customer’s show view that list all goods associated to that project and a “add good to customer” used to add a new object to customer.
You would want to do that at the model level with an association and then allow for nested attributes.
It might look like this
model
Then in the views for customer you would want to have the nested form. This Railscast gives a good overview for that. Because of the association and the
acceptsyou can automatically inherit them in the controller. Also there is a similar question here that amplifies the explanation.