Sha256: da5b75409b785bc56753b03d718c56aa5200d7269c320fae2cbbd37a483829a8

Contents?: true

Size: 290 Bytes

Versions: 10

Compression:

Stored size: 290 Bytes

Contents

class Profile
  include Mongoid::Document
  
  field :first_name
  field :last_name
  field :age
  
  embedded_in :user, :inverse_of => :profile
  
  validates_numericality_of :age, :greater_than => 0
  validates_acceptance_of :terms_of_service

  index({first_name: 1, last_name: 1 })
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mongoid-rspec-1.8.0 spec/models/profile.rb
mongoid-rspec-1.7.0 spec/models/profile.rb
mongoid-rspec-1.6.0 spec/models/profile.rb
mongoid-rspec-1.5.6 spec/models/profile.rb
mongoid-rspec-1.5.5 spec/models/profile.rb
mongoid-rspec-1.5.4 spec/models/profile.rb
mongoid-rspec-1.5.3 spec/models/profile.rb
mongoid-rspec-1.5.1 spec/models/profile.rb
mongoid-rspec-1.5.0 spec/models/profile.rb
mongoid-rspec-1.4.6 spec/models/profile.rb