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.
ScaffoldGenerator doesn't really handle plurals
#2331
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
end
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.