Sha256: 22c3adacd8ae29de1081f815c54c2152914656af223efdab4b69bd30356716f9

Contents?: true

Size: 268 Bytes

Versions: 31

Compression:

Stored size: 268 Bytes

Contents

class Oscar
  include Mongoid::Document
  field :title, type: String
  field :destroy_after_save, type: Mongoid::Boolean, default: false
  before_save :complain

  def complain
    if destroy_after_save?
      destroy
      true
    else
      false
    end
  end
end

Version data entries

31 entries across 28 versions & 3 rubygems

Version Path
mongoid-5.4.1 spec/app/models/oscar.rb
mongoid-5.4.0 spec/app/models/oscar.rb
mongoid-5.2.1 spec/app/models/oscar.rb
mongoid-5.2.0 spec/app/models/oscar.rb
mongoid-5.2.0.rc0 spec/app/models/oscar.rb
mongoid-5.1.6 spec/app/models/oscar.rb
mongoid-5.1.5 spec/app/models/oscar.rb
mongoid-5.1.4 spec/app/models/oscar.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-4.0.2/spec/app/models/oscar.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/mongoid-5.1.3/spec/app/models/oscar.rb
mongoid-5.1.3 spec/app/models/oscar.rb
mongoid-5.1.2 spec/app/models/oscar.rb
mongoid-5.1.1 spec/app/models/oscar.rb
mongoid-5.1.0 spec/app/models/oscar.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.1/spec/app/models/oscar.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/mongoid-5.0.2/spec/app/models/oscar.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/mongoid-5.0.2/spec/app/models/oscar.rb
mongoid-5.0.2 spec/app/models/oscar.rb
mongoid-5.0.1 spec/app/models/oscar.rb
mongoid-5.0.0 spec/app/models/oscar.rb