Make deleting an AltStyle also delete its ParentSwfAssetRelationships

Not relevant in-app as such, I'm just deleting records to re-test
things in development, and it helps to keep things in a more consistent
state!
This commit is contained in:
Emi Matchu 2024-10-18 17:06:13 -07:00
parent 50c9ba53e7
commit e7a0ff1234

View file

@ -4,7 +4,7 @@ class AltStyle < ApplicationRecord
belongs_to :species belongs_to :species
belongs_to :color belongs_to :color
has_many :parent_swf_asset_relationships, as: :parent has_many :parent_swf_asset_relationships, as: :parent, dependent: :destroy
has_many :swf_assets, through: :parent_swf_asset_relationships has_many :swf_assets, through: :parent_swf_asset_relationships
has_many :contributions, as: :contributed, inverse_of: :contributed has_many :contributions, as: :contributed, inverse_of: :contributed