Sha256: cc980a1fa44597d42f42d126a4b15771b67c75ad9a607ec088d5c1fbe27599a6
Contents?: true
Size: 379 Bytes
Versions: 1
Compression:
Stored size: 379 Bytes
Contents
# frozen_string_literal: true require 'rom/associations/one_to_many' module Gladwords module Associations # @api private class OneToMany < ROM::Associations::OneToMany def call(target:) target end def preload(target, loaded) target_pks = loaded.pluck(:id) target.where(foreign_key => target_pks) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gladwords-1.0.1 | lib/gladwords/associations/one_to_many.rb |