我有以下模型:
class Point < ActiveRecord::Base
...
has_one :next_point, class_name: "Point", foreign_key: "next_point_id"
belongs_to :previous_point, class_name: "Point", foreign_key: "next_point_id"
# It should return an array with the next remaining points
def next_remaining_points
end
end
如何执行返回 next_point 直到 next_point 为零的方法?