Sha256: 776685ac25c30db309fb1e1f41a9d1ba97ec447805439263a5d6cfa14acb2a64
Contents?: true
Size: 510 Bytes
Versions: 6
Compression:
Stored size: 510 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
6 entries across 6 versions & 1 rubygems