put_assoc code example
Example: put_assoc
1. build_assoc = We use build_assoc when we are creating a new record and we want to associate it with a parent record by setting a foreign key.
2. put_assoc = We use put_assoc when we have an existing record and we want to update its associations.
3. cast_assoc = We use cast_assoc when we have an existing record and we want to update its associations with external data(csv files)