Combining the Rails Confidence Builder and Atom’s processing model for content, and I’m nearly ready to consume some real data. Trouble is, each feed contains both entries and comments.
The solution is acts_as_tree. Adding the following to the DDL:
And the following to class Entry:
And modifying the creation of new entries to look like this:
post = parent ? parent.children.create : Entry.new
done. Entries can have comments, and (for future growth)
comments can be nested.
are defined, as well as instance methods for creating, querying,
updating, and removing both parents and children.