class Person < ActiveRecord::Base belongs_to :parent, class: Person has_many :children, class: Person, foreign_key: :parent_id has_many :grandchildren, class: Person, through: :children, source: :children end
Subscribe to:
Post Comments (Atom)
І таке буває...