Eylon Cohen4,779 Points
connecting two models with a has_many_through instnacer while updating
In the example you gave, you had to create a has_many_through model's instance with a reference to a model 1 instance, and other information (step 1) and then append it to a mode 2 instance (step 2). or - create the referance directly naming a model 1 instance and a model 2 instance (step 1), and then updating the required information of the has_many_through models' instance (step 2). in the example - create a subscription to a magazine of x monthes and then append it a subscriber OR connect a subscriber to a mazine and then update the monthes created subscription.
Is there a way to do that in one step?