When creating a new Musician, I also need to create a set of ItemLevels.
ItemLevel is polymorphic and also has_many :levels.
Levels just stores the various types of levels available to a musicians (stress, happiness, skill, etc).
ItemLevel joins a particular level (ie. stress) to a specific Musician (or Band or Manager…which is why it’s polymorphic).
So when a new Musician is created, I need to create all the ItemLevels for that musician. How would I do that?
You can use callback on your model
before_saveorbefore_createif you want only run your callback on your create. In this method you can create you levels.