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:
parent
50c9ba53e7
commit
e7a0ff1234
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue