Sha256: 50b7076f64ba6bf7e8f05fc0c151b176befb85eb8249c0f1805d4f2db32cfa6c

Contents?: true

Size: 341 Bytes

Versions: 16

Compression:

Stored size: 341 Bytes

Contents

module Graphiti
  module Adapters
    module ActiveRecord
      class BelongsToSideload < Sideload::BelongsTo
        include Inferrence

        def default_base_scope
          resource_class.model.all
        end

        def scope(parent_ids)
          base_scope.where(primary_key => parent_ids)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
graphiti-1.0.alpha.18 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.17 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.16 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.15 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.14 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.12 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.11 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.10 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.9 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.8 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.7 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.6 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.5 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.4 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-1.0.alpha.1 lib/graphiti/adapters/active_record/belongs_to_sideload.rb
graphiti-rb-1.0.alpha.1 lib/graphiti/adapters/active_record/belongs_to_sideload.rb