Sha256: d0bdddd6abd3ad45daa30308887a934ee12dbc6068a70cb31c6a95864e3f5b74

Contents?: true

Size: 571 Bytes

Versions: 10

Compression:

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

    def self.unique_column_names
      %w[bridge_id]
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bridge_cache-0.3.19 app/models/bridge_cache/program_enrollment.rb
bridge_cache-0.3.17 app/models/bridge_cache/program_enrollment.rb
bridge_cache-0.3.16 app/models/bridge_cache/program_enrollment.rb
bridge_cache-0.3.15 app/models/bridge_cache/program_enrollment.rb
bridge_cache-0.3.14 app/models/bridge_cache/program_enrollment.rb
bridge_cache-0.3.13 app/models/bridge_cache/program_enrollment.rb
bridge_cache-0.3.12 app/models/bridge_cache/program_enrollment.rb
bridge_cache-0.3.11 app/models/bridge_cache/program_enrollment.rb
bridge_cache-0.3.10 app/models/bridge_cache/program_enrollment.rb
bridge_cache-0.3.9 app/models/bridge_cache/program_enrollment.rb