Sha256: a74fbe970f03516bddff85ddc10f0cf7dd7a52e368ee6888f4a207e1b2dbc5d4

Contents?: true

Size: 217 Bytes

Versions: 38

Compression:

Stored size: 217 Bytes

Contents

class Princess
  include Mongoid::Document
  field :primary_color
  field :name, type: String
  def color
    primary_color.to_s
  end
  validates_presence_of :color
  validates :name, presence: true, on: :update
end

Version data entries

38 entries across 36 versions & 2 rubygems

Version Path
mongoid-7.0.13 spec/app/models/princess.rb
mongoid-7.0.12 spec/app/models/princess.rb
mongoid-6.4.8 spec/app/models/princess.rb
mongoid-7.0.11 spec/app/models/princess.rb
mongoid-7.0.10 spec/app/models/princess.rb
mongoid-6.4.7 spec/app/models/princess.rb
mongoid-6.4.5 spec/app/models/princess.rb
mongoid-7.0.8 spec/app/models/princess.rb
mongoid-7.0.7 spec/app/models/princess.rb
mongoid-7.0.6 spec/app/models/princess.rb
mongoid-7.0.5 spec/app/models/princess.rb
mongoid-7.0.4 spec/app/models/princess.rb
mongoid-6.4.4 spec/app/models/princess.rb
mongoid-7.0.3 spec/app/models/princess.rb
mongoid-6.4.2 spec/app/models/princess.rb
mongoid-7.0.2 spec/app/models/princess.rb
mongoid-7.0.1 spec/app/models/princess.rb
mongoid-6.4.1 spec/app/models/princess.rb
tdiary-5.0.8 vendor/bundle/gems/mongoid-6.4.0/spec/app/models/princess.rb
mongoid-7.0.0 spec/app/models/princess.rb