Sha256: da5194ca438e04b7ab7d8733a2a7a3fddd59a7bdb4e1ff1050c765ff63327409
Contents?: true
Size: 674 Bytes
Versions: 12
Compression:
Stored size: 674 Bytes
Contents
module BridgeCache class GroupEnrollment < ApplicationRecord extend BridgeCache::Data::BridgeModel def self.for_domain(domain_id) joins(:course_template).where(bridge_cache_course_templates: { domain_id: domain_id }) end belongs_to :group, foreign_key: :group_id, primary_key: BridgeCache.primary_key, class_name: BridgeCache::Group.name, optional: true belongs_to :course_template, foreign_key: :course_template_id, primary_key: BridgeCache.primary_key, class_name: BridgeCache::CourseTemplate.name, optional: true def self.unique_column_names %w[bridge_id] end end end
Version data entries
12 entries across 12 versions & 1 rubygems