Commit 0c8d9e19 authored by Benjamin Neff's avatar Benjamin Neff

delete aspect_visibilities when deleting the shareable

parent f9131289
......@@ -8,7 +8,7 @@ module Diaspora
module Shareable
def self.included(model)
model.instance_eval do
has_many :aspect_visibilities, as: :shareable, validate: false
has_many :aspect_visibilities, as: :shareable, validate: false, dependent: :delete_all
has_many :aspects, through: :aspect_visibilities
has_many :share_visibilities, as: :shareable, dependent: :delete_all
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment