diff options
Diffstat (limited to 'activerecord/test/models/node.rb')
-rw-r--r-- | activerecord/test/models/node.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/models/node.rb b/activerecord/test/models/node.rb index 07dd2dbccb..ae46c76b46 100644 --- a/activerecord/test/models/node.rb +++ b/activerecord/test/models/node.rb @@ -1,5 +1,7 @@ +# frozen_string_literal: true + 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 + belongs_to :parent, class_name: "Node", touch: true, optional: true + has_many :children, class_name: "Node", foreign_key: :parent_id, dependent: :destroy end |