Sha256: bada350938e97b6a1d92cc2f61ececfe7d66c85441faa4f4329bef7fb3caec1f
Contents?: true
Size: 509 Bytes
Versions: 9
Compression:
Stored size: 509 Bytes
Contents
module BridgeCache class ProgramEnrollment < BridgeBaseModel extend BridgeCache::Data::BridgeModel belongs_to :user, foreign_key: :user_id, primary_key: BridgeCache.primary_key, class_name: BridgeCache::User.name, optional: true belongs_to :program, foreign_key: :program_id, primary_key: BridgeCache.primary_key, class_name: BridgeCache::Program.name, optional: true def self.for_domain(domain_id) joins(:program).merge(BridgeCache::Program.for_domain(domain_id)) end end end
Version data entries
9 entries across 9 versions & 1 rubygems