Sha256: 70e1cbb6a1071c0b6ffd665a8c061ff996d0cbdd7788c7bd586336bc5d5ecaf6

Contents?: true

Size: 227 Bytes

Versions: 4

Compression:

Stored size: 227 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

class Phone
  include Mongoid::Document

  field :_id, type: String, overwrite: true, default: ->{ number }

  field :number
  embeds_one :country_code
  embedded_in :person
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid-7.1.2 spec/app/models/phone.rb
mongoid-7.1.1 spec/app/models/phone.rb
mongoid-7.1.0 spec/app/models/phone.rb
mongoid-7.1.0.rc0 spec/app/models/phone.rb