summaryrefslogtreecommitdiffhomepage
path: root/app/models/node.rb
blob: c6dab06e02d6e300684685fe64dcff122d4b4806 (plain)
1
2
3
4
5
class Node < ApplicationRecord
  has_many :children, class_name: "Node"
  belongs_to :parent, class_name: "Node", optional: true
  accepts_nested_attributes_for :parent
end