感谢你的回复!你的方法我调整了下部分就可以啦~ 不用递归更好了,分分钟容易挂
def get_all_subs ids = [self.id] ids.each do |id| id.to_employee.all_sub_ids.each{|e_id| ids.push(e_id) unless ids.include?(e_id)} end return ids end
在这么高的地方能看到日落日出真棒~ 环境不错噢~