Sha256: 72de5708ba6a5d64cc82c6b905dd3e65d56ede70dccb7eaa8f2ddc6e7e5e8571

Contents?: true

Size: 510 Bytes

Versions: 13

Compression:

Stored size: 510 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

    validates :coalescing_panda_course_id, presence: true
    validates :canvas_section_id, presence: true
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
coalescing_panda-3.2.3 app/models/coalescing_panda/section.rb
coalescing_panda-3.2.2 app/models/coalescing_panda/section.rb
coalescing_panda-3.2.1 app/models/coalescing_panda/section.rb
coalescing_panda-3.2.0 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.14 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.13 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.12 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.11 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.10 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.9 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.8 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.7 app/models/coalescing_panda/section.rb
coalescing_panda-3.1.6 app/models/coalescing_panda/section.rb