Sha256: 2de2cf1029aded425616a4c8339f8bf3b6bf7792c69fe2ac33b48f5d42071378
Contents?: true
Size: 365 Bytes
Versions: 12
Compression:
Stored size: 365 Bytes
Contents
class Topic < ActiveRecord::Base validates_presence_of :author_name validates :title, numericality: { only_integer: true }, on: :context_test has_many :books, inverse_of: :topic belongs_to :parent, class_name: "Topic" composed_of :description, mapping: [%w(title title), %w(author_name author_name)], allow_nil: true, class_name: "TopicDescription" end
Version data entries
12 entries across 12 versions & 2 rubygems