class Category < ActiveRecord::Base has_one :category belongs_to :category end
有没有推荐的方法来做到这一点吗?
class Category < ActiveRecord::Base has_one :child,:class_name => "Category" belongs_to :parent,:class_name => "Category" end