diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-06-25 14:23:06 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-06-25 14:23:06 +0200 |
commit | 5f5e6d924973003c105feb711cefdb726f312768 (patch) | |
tree | f446c5c65643c64b3afed0fd7367d9faecd9eeac /activerecord/test/models | |
parent | 41568f8c0781d6435dc3acf08bb12b00981dc4bb (diff) | |
download | rails-5f5e6d924973003c105feb711cefdb726f312768.tar.gz rails-5f5e6d924973003c105feb711cefdb726f312768.tar.bz2 rails-5f5e6d924973003c105feb711cefdb726f312768.zip |
Add pending test for the great-grandparent touching bug from #19324
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/node.rb | 5 | ||||
-rw-r--r-- | activerecord/test/models/tree.rb | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/models/node.rb b/activerecord/test/models/node.rb new file mode 100644 index 0000000000..07dd2dbccb --- /dev/null +++ b/activerecord/test/models/node.rb @@ -0,0 +1,5 @@ +class Node < ActiveRecord::Base + belongs_to :tree, touch: true + belongs_to :parent, class_name: 'Node', touch: true, optional: true + has_many :children, class_name: 'Node', foreign_key: :parent_id, dependent: :destroy +end diff --git a/activerecord/test/models/tree.rb b/activerecord/test/models/tree.rb new file mode 100644 index 0000000000..dc29cccc9c --- /dev/null +++ b/activerecord/test/models/tree.rb @@ -0,0 +1,3 @@ +class Tree < ActiveRecord::Base + has_many :nodes, dependent: :destroy +end |