Class: ROM::Associations::ManyToOne

Inherits:
Abstract
  • Object
show all
Defined in:
core/lib/rom/associations/many_to_one.rb

Overview

Abstract many-to-one association type

Direct Known Subclasses

Memory::Associations::ManyToOne

Instance Method Summary collapse

Instance Method Details

#callObject

This method is abstract.

Adapters must implement this method

Raises:

  • (NotImplementedError)


16
17
18
# File 'core/lib/rom/associations/many_to_one.rb', line 16

def call(*)
  raise NotImplementedError
end

#foreign_keySymbol

Return configured or inferred FK name

Returns:

  • (Symbol)


25
26
27
# File 'core/lib/rom/associations/many_to_one.rb', line 25

def foreign_key
  definition.foreign_key || source.foreign_key(target.name)
end