Sha256: 24667c85efd5bd90ac1dc85e3c1d6c8ef84aa43397d9f24a7ce775530bff3177

Contents?: true

Size: 554 Bytes

Versions: 24

Compression:

Stored size: 554 Bytes

Contents

class Service
  include Mongoid::Document
  field :sid
  field :before_destroy_called, type: Boolean, default: false
  field :after_destroy_called, type: Boolean, default: false
  field :after_initialize_called, type: Boolean, default: false
  embedded_in :person
  belongs_to :target, class_name: "User"
  validates_numericality_of :sid

  before_destroy do |doc|
    doc.before_destroy_called = true
  end

  after_destroy do |doc|
    doc.after_destroy_called = true
  end

  after_initialize do |doc|
    doc.after_initialize_called = true
  end
end

Version data entries

24 entries across 24 versions & 6 rubygems

Version Path
mongoid-paranoia-1.3.0 spec/app/models/service.rb
mongoid-paranoia-1.2.0 spec/app/models/service.rb
mongoid-paranoia-1.1.0 spec/app/models/service.rb
mongoid-paranoia-1.0.1 spec/app/models/service.rb
mongoid-3.1.7 spec/app/models/service.rb
mongoid-paranoia-1.0.0 spec/app/models/service.rb
mongoid-versioning-1.0.0 spec/app/models/service.rb
mongoid-paranoia-1.0.0.beta2 spec/app/models/service.rb
mongoid-versioning-1.0.0.beta2 spec/app/models/service.rb
mongoid-paranoia-1.0.0.beta1 spec/app/models/service.rb
mongoid-versioning-1.0.0.beta1 spec/app/models/service.rb
mongoid-3.1.6 spec/app/models/service.rb
sepastian-mongoid-rails4-4.0.1.alpha spec/app/models/service.rb
sepastian-mongoid-rails4-4.0.0.alpha spec/app/models/service.rb
mongoid-3.1.5 spec/app/models/service.rb
mongoid_heroku_stable-4.0.0 spec/app/models/service.rb
mongoid_rails4-4.0.0 spec/app/models/service.rb
mongoid-paranoia-0.3.0 spec/app/models/service.rb
mongoid-paranoia-0.2.1 spec/app/models/service.rb
mongoid-versioning-0.2.0 spec/app/models/service.rb