Error "invalid constant name" when creating a new model

I am trying to create a new model as follows:

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 the tags to ReportTags and still gave me the same error.

+5
source share
1 answer

Model names are unique - try

rails generate model Tag name:string
+12
source

All Articles