Sha256: c2571d12a9f70a978e4887e7c91eba2ffce83cad3c367071cded17fb5bc63252

Contents?: true

Size: 267 Bytes

Versions: 91

Compression:

Stored size: 267 Bytes

Contents

class ValidationCallback
  include Mongoid::Document
  field :history, type: Array, default: []
  validate do
    self.history << :validate
  end

  before_validation { self.history << :before_validation }
  after_validation { self.history << :after_validation }
end

Version data entries

91 entries across 86 versions & 8 rubygems

Version Path
mongoid-paranoia-1.0.1 spec/app/models/validation_callback.rb
mongoid-5.0.0.beta spec/app/models/validation_callback.rb
mongoid-3.1.7 spec/app/models/validation_callback.rb
mongoid-4.0.2 spec/app/models/validation_callback.rb
mongoid-4.0.1 spec/app/models/validation_callback.rb
mongoid-paranoia-1.0.0 spec/app/models/validation_callback.rb
mongoid-versioning-1.0.0 spec/app/models/validation_callback.rb
mongoid-paranoia-1.0.0.beta2 spec/app/models/validation_callback.rb
mongoid-versioning-1.0.0.beta2 spec/app/models/validation_callback.rb
mongoid-4.0.0 spec/app/models/validation_callback.rb
mongoid-4.0.0.rc2 spec/app/models/validation_callback.rb
mongoid-4.0.0.rc1 spec/app/models/validation_callback.rb
mongoid-4.0.0.beta2 spec/app/models/validation_callback.rb
mongoid-paranoia-1.0.0.beta1 spec/app/models/validation_callback.rb
mongoid-versioning-1.0.0.beta1 spec/app/models/validation_callback.rb
mongoid-4.0.0.beta1 spec/app/models/validation_callback.rb
mongoid-4.0.0.alpha2 spec/app/models/validation_callback.rb
mongoid-4.0.0.alpha1 spec/app/models/validation_callback.rb
mongoid-3.1.6 spec/app/models/validation_callback.rb
sepastian-mongoid-rails4-4.0.1.alpha spec/app/models/validation_callback.rb