Explanation:
I have 2 models, User and Interests, associated by a has_and_belongs_to_many. When a User is created I need to create all the interests and make the correct associations. Its an API, so I use as_json to render the response, but for some reason when I delete previous associations (self.interests.delete_all) and create new ones inside associate_interests method they don't render to the response. If I remove the "self.interests.delete_all", it renders all the associated interests. I have 2 models, User and Interest