Sha256: 358a775ebdc6609f3e5af2c067aa22f709973dd8f07278a6a81202e25e9baf21
Contents?: true
Size: 504 Bytes
Versions: 14
Compression:
Stored size: 504 Bytes
Contents
module DataCatalog class Categorization include MongoMapper::Document # == Attributes key :source_id, String key :category_id, String timestamps! # == Indices # == Associations belongs_to :source belongs_to :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
14 entries across 14 versions & 1 rubygems