Sha256: df8ca0c2ac6aa75e7fe41bf576d95e40d1a9dabd96898ec6690f274d65f0801e
Contents?: true
Size: 569 Bytes
Versions: 10
Compression:
Stored size: 569 Bytes
Contents
module DataCatalog class Note include MongoMapper::Document # == Attributes key :text, String key :user_id, ObjectId timestamps! # == Indices # == Associations belongs_to :user, :class_name => 'DataCatalog::User' # == Validations validates_presence_of :text validates_presence_of :user_id validate :general_validation def general_validation if user.nil? errors.add(:user_id, "must be valid") end end # == Class Methods # == Various Instance Methods end end
Version data entries
10 entries across 10 versions & 1 rubygems