Use dependent: :destroy for comments
This commit is contained in:
@@ -2,7 +2,7 @@ module Bubble::Commentable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
has_many :comments, dependent: :delete_all
|
||||
has_many :comments, dependent: :destroy
|
||||
end
|
||||
|
||||
def comment!(body)
|
||||
|
||||
Reference in New Issue
Block a user