You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- class ProjectCategory < ApplicationRecord
- include Projectable
- has_ancestry
-
- def self.descendants
- where.not(ancestry: [nil, ""])
- end
-
- def self.get_children(target_id)
- where(ancestry: target_id).pluck(:id,:name)
- end
-
- end
|