2010-02-26 04:53:30 +01:00
|
|
|
class Topic < ActiveRecord::Base
|
|
|
|
validates_presence_of :author_name
|
|
|
|
has_many :books
|
2010-03-14 03:33:03 +01:00
|
|
|
belongs_to :parent, :class_name => "Topic"
|
2010-02-26 04:53:30 +01:00
|
|
|
|
|
|
|
composed_of :description, :mapping => [ %w(title title), %w(author_name author_name)], :allow_nil => true, :class_name => "TopicDescription"
|
|
|
|
end
|