Skip to content

Commit

Permalink
Deleting a campaign shouldn't delete related leads and opportunities.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyken committed Aug 23, 2024
1 parent 5d198d9 commit 78f2e51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/entities/campaign.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class Campaign < ActiveRecord::Base
belongs_to :user, optional: true # TODO: Is this really optional?
belongs_to :assignee, class_name: "User", foreign_key: :assigned_to, optional: true # TODO: Is this really optional?
has_many :tasks, as: :asset, dependent: :destroy # , :order => 'created_at DESC'
has_many :leads, -> { order "id DESC" }, dependent: :destroy
has_many :opportunities, -> { order "id DESC" }, dependent: :destroy
has_many :leads, -> { order "id DESC" }
has_many :opportunities, -> { order "id DESC" }
has_many :emails, as: :mediator

serialize :subscribed_users, Array
Expand Down

0 comments on commit 78f2e51

Please sign in to comment.