Commit a74a69db authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Use destroy, in case we ever have before_destroy callbacks on Task

parent ba0bb170d633
......@@ -37,7 +37,7 @@ class Note < ActiveRecord::Base
belongs_to :author, class_name: "User"
belongs_to :updated_by, class_name: "User"
has_many :tasks, dependent: :delete_all
has_many :tasks, dependent: :destroy
delegate :name, to: :project, prefix: true
delegate :name, :email, to: :author, prefix: true
......
......@@ -27,7 +27,7 @@
it { is_expected.to belong_to(:noteable) }
it { is_expected.to belong_to(:author).class_name('User') }
it { is_expected.to have_many(:tasks).dependent(:delete_all) }
it { is_expected.to have_many(:tasks).dependent(:destroy) }
end
describe 'validation' do
......
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