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

delete aspect_visibilities when deleting the shareable

parent f9131289
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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