This project is archived and is in readonly mode.

#2331 ✓invalid

ScaffoldGenerator doesn't really handle plurals

Reported by Ivan | March 24th, 2009 @ 11:43 PM | in 2.x

The following lines present in scaffold_generator.rb :

if @name == @name.pluralize && !options[:force_plural]
      logger.warning "Plural version of the model detected, using singularized version.  Override with --force-plural."
      @name = @name.singularize

are meant to handle the passing of a model pluralized to the generator. However it isn't completely effective because of class_name which comes from the parent class NamedBase and is used in the templates and thus produces incorrect things like Projects.all in the controller or new_projects_path in the views whereas the model that has been generated is Project.

Comments and changes to this ticket

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=""></a>

People watching this ticket