Sha256: 72e8a3e63085c18e8d87fce2cc409039a08bd0c505e44e4880c5afa2bfe611ed
Contents?: true
Size: 481 Bytes
Versions: 10
Compression:
Stored size: 481 Bytes
Contents
# frozen_string_literal: true module Clowne module Adapters # :nodoc: all class ActiveRecord module Associations class HasMany < Base def call(record) with_scope.each do |child| child_clone = clone_one(child) child_clone[:"#{reflection.foreign_key}"] = nil record.__send__(association_name) << child_clone end record end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems