Phoenix 无法生成 html 模板,错误为 "invalid module name"
Phoenix unable to generate html template with error "invalid module name"
运行 phx.gen.html 模板有问题。这是我正在尝试的命令
mix phx.gen.html Shipments shipmentroutes shipmentroute address:string date:string groups_involved:string
带有这样的错误信息
mix phx.gen.html, phx.gen.json and phx.gen.context expect a
context module name, followed by singular and plural names of
the generated resource, ending with any number of attributes.
For example:
mix phx.gen.html Accounts User users name:string
mix phx.gen.json Accounts User users name:string
mix phx.gen.context Accounts User users name:string
The context serves as the API boundary for the given resource.
Multiple resources may belong to a context and a resource may be
split over distinct contexts (such as Accounts.User and Payments.User).
它没有说明为什么它不是有效的模块名称,所以我不知道如何解决这个问题。我没有在网上看到任何类似的东西。知道为什么 phoenix 认为这是一个错误的模块名称吗?
对于遇到此问题的任何人,phoenix 允许任何以大写字母开头的模式,因此它应该如下所示
mix phx.gen.html Shipments Shipmentroutes shipmentroute address:string date:string groups_involved:string
运行 phx.gen.html 模板有问题。这是我正在尝试的命令
mix phx.gen.html Shipments shipmentroutes shipmentroute address:string date:string groups_involved:string
带有这样的错误信息
mix phx.gen.html, phx.gen.json and phx.gen.context expect a
context module name, followed by singular and plural names of
the generated resource, ending with any number of attributes.
For example:
mix phx.gen.html Accounts User users name:string
mix phx.gen.json Accounts User users name:string
mix phx.gen.context Accounts User users name:string
The context serves as the API boundary for the given resource.
Multiple resources may belong to a context and a resource may be
split over distinct contexts (such as Accounts.User and Payments.User).
它没有说明为什么它不是有效的模块名称,所以我不知道如何解决这个问题。我没有在网上看到任何类似的东西。知道为什么 phoenix 认为这是一个错误的模块名称吗?
对于遇到此问题的任何人,phoenix 允许任何以大写字母开头的模式,因此它应该如下所示
mix phx.gen.html Shipments Shipmentroutes shipmentroute address:string date:string groups_involved:string