search for: array_of_e

Displaying 1 result from an estimated 1 matches for "array_of_e".

2005 Dec 26
0
Why isn''t this working???
...tree = nil def Object.format_as_list(options = {}, pid = nil, level = 0, &block) @@TreeListView_tree ||= self.find(:all, options) t = Array.new return t if @@TreeListView_tree.nil? list = @@TreeListView_tree.find_all { |e| e.parent_id == pid }.sort! list.each do |e| array_of_e = (block.nil? ? e : yield(e, level)) t.size == 0 ? t = [array_of_e] : t << array_of_e t += format_as_list(options, e.id, level + 1, &block) end t end def Object.traverse_tree(options = {}, pid = nil, level = 0, &block) @@TreeListView_tree ||= self.find(:al...