From 5f5e6d924973003c105feb711cefdb726f312768 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 25 Jun 2015 14:23:06 +0200 Subject: Add pending test for the great-grandparent touching bug from #19324 --- activerecord/test/models/node.rb | 5 +++++ activerecord/test/models/tree.rb | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 activerecord/test/models/node.rb create mode 100644 activerecord/test/models/tree.rb (limited to 'activerecord/test/models') 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 -- cgit v1.2.3