Juan K. wrote:
For example, a Company has_many Threats and a Threat belongs_to a
Company and I want to populate the table Threats with some default
threats when a Company is created.
Precisely! The default action for a ‘company creation’ step is to
manufacture n threats associated with that company. The behavior of
defaulting those records for each company as it is created belongs in
the Company model (in my opinion).
If you have different ‘default’ threats depending on what kind of
company is created (threats are dependent on a company attribute), then
all the more reason for that defaulting logic to be contained in the
I don’t use the same threats for each
company because each company can add, delete and modify their threats as
they want, so I don’t want to share threats. If you think this can be
done differently better any hint will be really appreciated
You would create an instance of each desired threat type for each
company when the company was created. No threat sharing was intended in
my earlier response, sorry for the ambiguity.