Sha256: 4a6a0a9252f375bcb256c71c3a2bfa2b3f76e670023afea79f18f62f5b882d2f

Contents?: true

Size: 267 Bytes

Versions: 4

Compression:

Stored size: 267 Bytes

Contents

# 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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ibm_db-5.5.0-x86-mingw32 test/models/node.rb
ibm_db-5.4.1-x86-mingw32 test/models/node.rb
ibm_db-5.4.0-x86-mingw32 test/models/node.rb
ibm_db-5.3.2-x86-mingw32 test/models/node.rb