Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Incorrect display of warning when invoking scaffold generator equal singular/plural noun

#5363

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.

Reported by cuthbert · August 12th, 2010 @ 10:28 AM

State: resolved
Milestone: 3.x
Assigned to: José Valim José Valim
Importance: Low

Activity

  1. José Valim
    José Valim
    • Milestone set to 3.x
    • Importance changed from to Low

    Patch please?

    August 12th, 2010 @ 05:00 PM

  2. Jeff Kreeftmeijer
    Jeff Kreeftmeijer
    • 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. :)

    October 14th, 2010 @ 08:26 PM

  3. Jeff Kreeftmeijer
    Jeff Kreeftmeijer
    • Assigned user set to José Valim

    October 14th, 2010 @ 08:36 PM

  4. Jeff Kreeftmeijer
    Jeff Kreeftmeijer
    • Tag cleared.

    Automatic cleanup of spam.

    November 8th, 2010 @ 08:26 AM

  5. Repository
  6. Repository