Sha256: 007caf04af6dd7268a22653cd484492baaab90dec5b513b51834400a307264e0

Contents?: true

Size: 417 Bytes

Versions: 10

Compression:

Stored size: 417 Bytes

Contents

# frozen_string_literal: true

module Clowne
  module Adapters # :nodoc: all
    class ActiveRecord
      module Associations
        class HABTM < Base
          def call(record)
            with_scope.each do |child|
              child_clone = clone_one(child)
              record.__send__(association_name) << child_clone
            end

            record
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
clowne-1.5.0 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb
clowne-1.4.0 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb
clowne-1.3.0 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb
clowne-1.2.0 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb
clowne-1.1.0 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb
clowne-1.0.0 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb
clowne-0.2.0 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb
clowne-0.1.0 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb
clowne-0.1.0.beta1 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb
clowne-0.1.0.pre1 lib/clowne/adapters/active_record/associations/has_and_belongs_to_many.rb