开发者

"wrong constant name" error when generating a new model

开发者 https://www.devze.com 2023-02-08 03:33 出处:网络
I\'m trying to create a new开发者_JAVA技巧 model like this: rails generate model Tags name:string

I'm trying to create a new开发者_JAVA技巧 model like this:

rails generate model Tags name:string

When I run this, I get the following error:

base.rb:266:in `const_defined?': wrong constant name tags (NameError)

Any thoughts? I tried changing Tags to ReportTags and it still gave me the same error.


Model names are singular - try

rails generate model Tag name:string
0

精彩评论

暂无评论...
验证码 换一张
取 消