Sha256: 88aae2d4c9a25cc3d1c337232a70ae214e49b63596c48eb074e88d6855ad0872

Contents?: true

Size: 254 Bytes

Versions: 17

Compression:

Stored size: 254 Bytes

Contents

# frozen_string_literal: true

class Student
  include Mongoid::Document

  belongs_to :school

  field :name, type: String
  field :grade, type: Integer, default: 3

  after_destroy do |doc|
    school.after_destroy_triggered = true if school
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mongoid-8.1.8 spec/support/models/student.rb
mongoid-8.1.7 spec/support/models/student.rb
mongoid-8.1.6 spec/support/models/student.rb
mongoid-8.0.8 spec/support/models/student.rb
mongoid-8.1.5 spec/support/models/student.rb
mongoid-8.1.4 spec/support/models/student.rb
mongoid-8.0.7 spec/support/models/student.rb
mongoid-8.1.3 spec/support/models/student.rb
mongoid-8.1.2 spec/support/models/student.rb
mongoid-8.0.6 spec/support/models/student.rb
mongoid-8.1.1 spec/support/models/student.rb
mongoid-8.0.5 spec/support/models/student.rb
mongoid-8.1.0 spec/support/models/student.rb
mongoid-8.0.4 spec/support/models/student.rb
mongoid-8.0.3 spec/support/models/student.rb
mongoid-8.0.2 spec/support/models/student.rb
mongoid-8.0.1 spec/support/models/student.rb