You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create/ update a record with associated data and also with a specific field only for the the create operation. I am running into the following situation:
I am trying to create/ update a record with associated data and also with a specific field only for the the create operation. I am running into the following situation:
In this case the
nested_resource
gets updated if the record gets updated, but thespecial_attribute
gets set as well.If I want to keep the
special_attribute
only on create and switch to something like this:Then the nested resource doesn't get updated when the record gets updated (a new associated record is created instead).
Is there a way to specify nested attributes just for update operation?
I tried
record.update(params)
and it doesn't work for me.The text was updated successfully, but these errors were encountered: