Sha256: f16cdfaec96669ab9046732cf3155698aa66e12518be342b1e317eee6fe1df46
Contents?: true
Size: 622 Bytes
Versions: 10
Compression:
Stored size: 622 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
10 entries across 10 versions & 1 rubygems