Sha256: 906d20b880f75b988f772fb423cbd53582d9c474ff3939832ea8424deb9026d7

Contents?: true

Size: 402 Bytes

Versions: 8

Compression:

Stored size: 402 Bytes

Contents

module CoalescingPanda
  class Section < ActiveRecord::Base
    belongs_to :course, foreign_key: :coalescing_panda_course_id, class_name: 'CoalescingPanda::Course'
    has_many :enrollments, foreign_key: :coalescing_panda_section_id, class_name: 'CoalescingPanda::Enrollment'
    has_many :users, through: :enrollments, class_name: 'CoalescingPanda::User'

    delegate :account, to: :course
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
coalescing_panda-3.1.5 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.4 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.3 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.2 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.1 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.0 app/models/coalescing_panda/section.rb
coalescing_panda-3.0.1 app/models/coalescing_panda/section.rb
coalescing_panda-3.0.0 app/models/coalescing_panda/section.rb