This project is archived and is in readonly mode.
Incorrect display of warning when invoking scaffold generator equal singular/plural noun
Reported by cuthbert | August 12th, 2010 @ 10:28 AM | in 3.x
Tested with Rails 3.0.0.rc:
rails new testapp
cd testapp
rails generate scaffold Series name:string
This incorrectly gives the following warning:
"Plural version of the model detected, using singularized version.
Override with --force-plural."
Since the noun series is identical in both singular and plural mode, the above scaffold generation is typed correctly, and should not give a warning. Such a warning should only be given when the noun's singular and plural spelling is different.
Note that the code generated (and names used in the code) seems to be perfectly correct for this case. The issue is only with an unwarranted display of the warning.
Comments and changes to this ticket
-
José Valim August 12th, 2010 @ 05:00 PM
- Milestone set to 3.x
- Importance changed from to Low
Patch please?
-
Jeff Kreeftmeijer October 14th, 2010 @ 08:26 PM
- State changed from new to open
- Tag changed from generator, plural, scaffold, singularize to generator, patch, plural, scaffold, singularize
I've attached a patch that makes sure the plural and singular version of a word aren't the same before throwing the warning. :)
-
Jeff Kreeftmeijer October 14th, 2010 @ 08:36 PM
- Assigned user set to José Valim
-
Repository November 11th, 2010 @ 04:24 PM
- State changed from open to resolved
(from [be63e03fbab4c6e2b71069c4cceaba0283ca87be]) The model generator shouldn't throw warnings when using mass nouns [#5363 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
https://github.com/rails/rails/commit/be63e03fbab4c6e2b71069c4cceab... -
Repository November 11th, 2010 @ 04:25 PM
(from [154e5d735efcc840c3be52a19b1f8a89eeb2e9e9]) The model generator shouldn't throw warnings when using mass nouns [#5363 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
https://github.com/rails/rails/commit/154e5d735efcc840c3be52a19b1f8...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 5363 Incorrect display of warning when invoking scaffold generator equal singular/plural noun (from [be63e03fbab4c6e2b71069c4cceaba0283ca87be]) The mod...
- 5363 Incorrect display of warning when invoking scaffold generator equal singular/plural noun (from [154e5d735efcc840c3be52a19b1f8a89eeb2e9e9]) The mod...