Sha256: de7fdc8d36e7a238e1f3a1493633270b3810eef1504f8e876c3a4ef6371d7fba

Contents?: true

Size: 351 Bytes

Versions: 16

Compression:

Stored size: 351 Bytes

Contents

module Graphiti
  module Adapters
    module ActiveRecord # todo change
      class HasManySideload < Sideload::HasMany
        include Inferrence

        def default_base_scope
          resource_class.model.all
        end

        def scope(parent_ids)
          base_scope.where(foreign_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/has_many_sideload.rb
graphiti-1.0.alpha.17 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.16 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.15 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.14 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.12 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.11 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.10 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.9 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.8 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.7 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.6 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.5 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.4 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-1.0.alpha.1 lib/graphiti/adapters/active_record/has_many_sideload.rb
graphiti-rb-1.0.alpha.1 lib/graphiti/adapters/active_record/has_many_sideload.rb