has many destroy child code example
Example: should destroy child reviews when destroying self active record
class Parent < ActiveRecord::Base
has_many :children, dependent: :destroy
end
class Parent < ActiveRecord::Base
has_many :children, dependent: :destroy
end