Sha256: 8748ffb7b0de8cfffb4f3a75e14c786719ff15daaafd75717ae454c16071dafe
Contents?: true
Size: 584 Bytes
Versions: 10
Compression:
Stored size: 584 Bytes
Contents
module DataCatalog class Categorization include MongoMapper::Document # == Attributes key :source_id, String key :category_id, String timestamps! # == Indices # == Associations belongs_to :source, :class_name => 'DataCatalog::Source' belongs_to :category, :class_name => 'DataCatalog::Category' # == Validations validate :validate_associations def validate_associations errors.add(:source_id, "must be valid") if source.nil? errors.add(:category_id, "must be valid") if category.nil? end end end
Version data entries
10 entries across 10 versions & 1 rubygems