lib/rom/sql/plugin/associates.rb in rom-sql-3.1.0 vs lib/rom/sql/plugin/associates.rb in rom-sql-3.2.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'rom/sql/associations'
module ROM
module SQL
module Plugin
@@ -46,11 +48,11 @@
# @api public
module ClassMethods
# @see ROM::Command::ClassInterface.build
#
# @api public
- def build(relation, options = EMPTY_HASH)
+ def build(relation, **options)
command = super
configured_assocs = command.configured_associations
associate_options = command.associations.map { |(name, opts)|
@@ -144,10 +146,10 @@
#
# @api public
def with_association(name, opts = EMPTY_HASH)
self.class.build(
relation,
- { **options, associations: associations.merge(name => opts) }
+ **options, associations: associations.merge(name => opts)
)
end
end
end
end