lib/rom/plugins/relation/sql/auto_combine.rb in rom-sql-1.0.0.beta2 vs lib/rom/plugins/relation/sql/auto_combine.rb in rom-sql-1.0.0.beta3
- old
+ new
@@ -30,10 +30,10 @@
# @api private
def for_combine(spec)
source_key, target_key, target =
case spec
when ROM::SQL::Association
- [*spec.join_keys(__registry__).flatten, spec.call(__registry__)]
+ [*spec.join_keys(__registry__).flatten, spec.call(__registry__, self)]
else
[*spec.flatten, self]
end
target.preload(source_key, target_key)