Sha256: 4ec72836afff4801258c9405cf8a11f2df124c20b4f66cc043d083f7e4cf1cfa

Contents?: true

Size: 473 Bytes

Versions: 2

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

require "rom/associations/one_to_many"

module ROM
  module HTTP
    module Associations
      # OneToMany implementation
      class OneToMany < ROM::Associations::OneToMany
        def call(target: self.target)
          raise MissingAssociationViewError, "must override view" unless view

          schema = target.schema.qualified
          relation = target
          apply_view(schema, relation)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rom-http-0.10.0 lib/rom/http/associations/one_to_many.rb
rom-http-0.9.0 lib/rom/http/associations/one_to_many.rb