Sha256: 192b4a1217e91fec18711b04cc5bf911849935bc5501b2ba741863f828b68c46

Contents?: true

Size: 217 Bytes

Versions: 24

Compression:

Stored size: 217 Bytes

Contents

# frozen_string_literal: true

class Division
  include Mongoid::Document
  field :name, type: String
  embedded_in :league
  before_destroy :update_parent

  def update_parent
    league.name = "Destroyed"
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mongoid-8.0.1 spec/support/models/division.rb
mongoid-7.5.0 spec/support/models/division.rb
mongoid-7.4.1 spec/support/models/division.rb
mongoid-7.4.0 spec/support/models/division.rb