Sha256: e4e4dd809695478f33ec98ab5751f6561a699ee1757ea14544153a6da30fbab6
Contents?: true
Size: 567 Bytes
Versions: 10
Compression:
Stored size: 567 Bytes
Contents
module DataCatalog class Note include MongoMapper::Document # == Attributes key :text, String key :user_id, String 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