运行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会将其视为错误的模块名称?
答案 0 :(得分:0)
对于遇到这种情况的任何人,phoenix允许以架构中的大写字母开头的任何内容,因此它应该看起来像这样
mix phx.gen.html Shipments Shipmentroutes shipmentroute address:string date:string groups_involved:string