lib/rom/sql/schema/dsl.rb in rom-sql-0.8.0 vs lib/rom/sql/schema/dsl.rb in rom-sql-0.9.0
- old
+ new
@@ -14,13 +14,16 @@
def call
SQL::Schema.new(name, attributes, opts)
end
def opts
- opts = {}
- opts[:associations] = associations_dsl.call if associations_dsl
- opts[:inferrer] = inferrer.new(self) if inferrer
- opts
+ opts = { inferrer: inferrer }
+
+ if associations_dsl
+ { **opts, associations: associations_dsl.call }
+ else
+ opts
+ end
end
end
end
end
end