087e438eb6
By default, `has_and_belongs_to_many` properly deletes the record in the join table. However, as the association is declared manually with a `has_many / through`, it doesn't delete the joined record automatically. As we also lack a foreign-key contraint on the join table, that means a dangling record remains in the join table. To fix this, let's declare it a proper `has_and_belongs_to_many` association, which will let the join record be deleted automatically on destroy. |
||
---|---|---|
.. | ||
controllers | ||
factories | ||
fixtures | ||
graphql | ||
helpers | ||
jobs | ||
lib | ||
mailers | ||
middlewares | ||
models | ||
policies | ||
serializers | ||
services | ||
support | ||
system | ||
views | ||
rails_helper.rb | ||
spec_helper.rb |