mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
9617db2078
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
10 lines
260 B
Ruby
10 lines
260 B
Ruby
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
|