aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/topic.rb
diff options
context:
space:
mode:
authorSantosh Wadghule <santosh.wadghule@gmail.com>2018-05-22 19:04:24 +0530
committerSantosh Wadghule <santosh.wadghule@gmail.com>2018-05-28 18:23:21 +0530
commitd7a3f33dbd4726480fcbefc0c3c1270396f61fd2 (patch)
treec7fef63458aafa3893a8819ab3c918a0f6bc64b1 /activerecord/test/models/topic.rb
parent2f76256127d35cfbfaadf162e4d8be2d0af4e453 (diff)
downloadrails-d7a3f33dbd4726480fcbefc0c3c1270396f61fd2.tar.gz
rails-d7a3f33dbd4726480fcbefc0c3c1270396f61fd2.tar.bz2
rails-d7a3f33dbd4726480fcbefc0c3c1270396f61fd2.zip
Fix parent record should not get saved with duplicate children records
- Fixes #32940
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r--activerecord/test/models/topic.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index 2e386d7669..c6c9ccbc8d 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -47,6 +47,7 @@ class Topic < ActiveRecord::Base
has_many :unique_replies, dependent: :destroy, foreign_key: "parent_id"
has_many :silly_unique_replies, dependent: :destroy, foreign_key: "parent_id"
+ has_many :validate_unique_content_replies, dependent: :destroy, foreign_key: "parent_id"
serialize :content