Sha256: 9a7b9df34df2b50148ba69267ea02c1b07d87ead681c611b5869874bd8635099

Contents?: true

Size: 598 Bytes

Versions: 5

Compression:

Stored size: 598 Bytes

Contents

class Person
  include Mongoid::Document

  field :age, type: Integer, default: "100"
  field :score, type: Integer

  attr_reader :rescored

  embeds_many :phone_numbers, class_name: "Phone", validate: false
  embeds_many :phones, store_as: :mobile_phones, validate: false
  embeds_many :addresses, as: :addressable, validate: false

  embeds_many :appointments, validate: false
  embeds_many :paranoid_phones, validate: false

  has_many :paranoid_posts, validate: false
  belongs_to :paranoid_post

  accepts_nested_attributes_for :addresses
  accepts_nested_attributes_for :paranoid_phones
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mongoid_paranoia-0.4.0 spec/app/models/person.rb
mongoid_paranoia-0.3.0 spec/app/models/person.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/bundler/gems/mongoid-paranoia-83dc8de7b426/spec/app/models/person.rb
mongoid_paranoia-0.2.1 spec/app/models/person.rb
mongoid_paranoia-0.2.0 spec/app/models/person.rb