# * George Moschovitis # (c) 2004-2005 Navel, all rights reserved. # $Id$ require 'lib/content' # The models used in the Blog part. # Forward reference to the Comment definition. class Comment; end # Common properties/methods for the other classes. # Since markup is required, automatically handles # the markup expanding/compacting for the body. module Common include N::BaseContent include N::CreateTime prop_accessor :author, String validate_value :body end # An entry in the Blog. class BlogEntry include Common has_many :comments, Comment, :linkback => 'entry_oid' validate_value :title, :msg => 'Please provide a title' end # A comment to the blog entry. class Comment include Common belongs_to :entry, BlogEntry validate_value :author, :msg => 'Please enter your name' end