lib/hanami/cli/commands/app/generate/command.rb in hanami-cli-2.2.0.beta1 vs lib/hanami/cli/commands/app/generate/command.rb in hanami-cli-2.2.0.beta2
- old
+ new
@@ -36,11 +36,22 @@
end
# @since 2.2.0
# @api private
def call(name:, slice: nil, **)
- normalized_slice = inflector.underscore(slice) if slice
- generator.call(app.namespace, name, normalized_slice)
+ if slice
+ generator.call(
+ key: name,
+ namespace: slice,
+ base_path: fs.join("slices", inflector.underscore(slice))
+ )
+ else
+ generator.call(
+ key: name,
+ namespace: app.namespace,
+ base_path: "app"
+ )
+ end
end
end
end
end
end