Method: ROM::Associations::ManyToOne#associate
- Defined in:
- core/lib/rom/associations/many_to_one.rb
#associate(child, parent) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Associate child with a parent
37 38 39 40 |
# File 'core/lib/rom/associations/many_to_one.rb', line 37 def associate(child, parent) fk, pk = join_key_map child.merge(fk => parent.fetch(pk)) end |