lib/hanami/cli/generators/app/relation.rb in hanami-cli-2.2.0.beta1 vs lib/hanami/cli/generators/app/relation.rb in hanami-cli-2.2.0.beta2

- old
+ new

@@ -17,22 +17,23 @@ @out = out end # @since 2.2.0 # @api private - def call(app_namespace, key, slice) + def call(key:, namespace:, base_path:) schema_name = key.split(KEY_SEPARATOR).last RubyFileWriter.new( fs: fs, inflector: inflector, - app_namespace: app_namespace, + ).call( + namespace: namespace, key: key, - slice: slice, + base_path: base_path, extra_namespace: "Relations", relative_parent_class: "DB::Relation", body: ["schema :#{schema_name}, infer: true"], - ).call + ) end private attr_reader :fs, :inflector, :out