Sha256: 65fe0c6eea5c22566fd0626bf6f2e5ce599a1cce4afba97b753b573a3d7b93bd

Contents?: true

Size: 644 Bytes

Versions: 12

Compression:

Stored size: 644 Bytes

Contents

module BridgeCache
  class LearnerCustomFieldValue < ApplicationRecord
    extend BridgeCache::Data::BridgeModel

    def self.for_domain(domain_id)
      joins(:user).where(bridge_cache_users: { domain_id: domain_id })
    end

    belongs_to :user, foreign_key: :user_id, primary_key: BridgeCache.primary_key, class_name: BridgeCache::User.name,
                      optional: true
    belongs_to :custom_field, foreign_key: :custom_field_id, primary_key: BridgeCache.primary_key,
                              class_name: BridgeCache::CustomField.name, optional: true

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
bridge_cache-0.4.7 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.4.6 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.4.5 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.4.4 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.4.3 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.4.2 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.4.1 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.3.24 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.3.23 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.3.22 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.3.21 app/models/bridge_cache/learner_custom_field_value.rb
bridge_cache-0.3.20 app/models/bridge_cache/learner_custom_field_value.rb