# lets say this is a comments model, acts_as_tree # used like this @post.comments.find_roots
def self.find_roots(options = {}) with_scope :find => options do self.find(:conditions => ['parent_id IS NULL'], :order => :position ) end end
# Question: how can i enforce any call is scoped by project_id? # (I dont want to allow Post.find_roots, it must have a project_id)