Displaying 1 result from an estimated 1 matches for "print_children".
Did you mean:
  paintchildren
  
2006 Feb 24
2
how to better generalize a tree?
first some background info:
I have a blog application that has a comments table with the following columns:
id
parent_id
post_id
created_at
body
here''s my model:
class Comment < ActiveRecord::Base
  belongs_to :post
  acts_as_tree :order => ''created_at''
  def print_children (options={})
    before          = options[:before]          ? options[:before]          : ''''
    after           = options[:after]           ? options[:after]           : ''''
    before_children = options[:before_children] ? options[:before_children] : ''...