Report abuse

helper

module FormHelper

    def render_tree_select(pages, name, control_id, control_name, current_selection, exclusion, blank_record)
      ret = ''    
      ret += "" 
    end

    def recurse_tree(page, depth, name, current_selection, exclusion)
      depth = depth + 1
      level = "- " * depth
      ret = ''
      if page.children.size > 0
        page.children.each { |subpage| 
          if subpage.id != exclusion
          if subpage.children.size > 0
              ret += ''
           end
         end
         }
         ret += ''
      end
    end  
end

view

		<%= render_tree_select(Page.find(:all, :conditions => ["parent_id = ? and id != ?", 0, @page.id], :order => :position), :title, 'page_parent_id', 'page[parent_id]', @page.parent_id, @page.id, 'Main page (no parent)') %>