Sha256: 91d528a2332e99f46ad49057399794834b242ba86529936f26f1602e776e19d5

Contents?: true

Size: 291 Bytes

Versions: 1

Compression:

Stored size: 291 Bytes

Contents

# frozen_string_literal: true

require_dependency "models/arunit2_model"
require "active_support/core_ext/object/with_options"

class College < ARUnit2Model
  has_many :courses

  with_options dependent: :destroy do |assoc|
    assoc.has_many :students, -> { where(active: true) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-on-quails-0.1.0 activerecord/test/models/college.rb