# Plural version of the model detected, using singularized version. Override with --force-plural

**URL:** <https://www.ruby-forum.com/t/plural-version-of-the-model-detected-using-singularized-version-override-with-force-plural/176609>\
**Category:** Rails\
**Created:** [October 3, 2009, 12:32am UTC](https://www.ruby-forum.com/t/plural-version-of-the-model-detected-using-singularized-version-override-with-force-plural/176609 "2009-10-03T00:32:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f19dbf/32.png) [@Boar](https://www.ruby-forum.com/u/Boar)\
**Post date:** [October 3, 2009, 12:32am UTC](https://www.ruby-forum.com/t/plural-version-of-the-model-detected-using-singularized-version-override-with-force-plural/176609/1 "2009-10-03T00:32:34Z")

</div>

what is the proper way to make this work? --force-plural doesn’t seem  
to change the results. this only seems to happen when you choose  
words that the plural and singular is the same word.

script/generate scaffold equipment name:string description:text  
warning Plural version of the model detected, using singularized  
version. Override with --force-plural.

results in the following error when you try to go to /equipment/new

ActionView::TemplateError (equipment\_url failed to generate from  
{:action=\>“show”, :controller=\>“equipment”} - you may have ambiguous  
routes, or you may need to supply additional parameters for this  
route. content\_url has the following required parameters:  
[“equipment”, :id] - are they all satisfied?) on line #3 of app/views/  
equipment/new.html.erb:  
1:

# New equipment
  
2:  
3: \<% form\_for(@equipment) do |f| %\>  
4: \<%= f.error\_messages %\>  
5:  
6: 

```
(eval):16:in `equipment_path'
app/views/equipment/new.html.erb:3
app/controllers/equipment_controller.rb:29:in `new'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
```

---

<div class="post-metadata">

**Author:** ![Boar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f19dbf/32.png) [@Boar](https://www.ruby-forum.com/u/Boar)\
**Post date:** [October 3, 2009, 3:51am UTC](https://www.ruby-forum.com/t/plural-version-of-the-model-detected-using-singularized-version-override-with-force-plural/176609/2 "2009-10-03T03:51:35Z")

</div>

The long answer is to edit the file “YOUR\_APPLICATION/config/  
initializers/inflections.rb” to specify what you want to use for the  
singular / plural pair.

The short answer is choose model names that have unique singular /  
plural forms.

---

<div class="post-metadata">

**Author:** ![Boar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f19dbf/32.png) [@Boar](https://www.ruby-forum.com/u/Boar)\
**Post date:** [October 3, 2009, 10:23am UTC](https://www.ruby-forum.com/t/plural-version-of-the-model-detected-using-singularized-version-override-with-force-plural/176609/3 "2009-10-03T10:23:08Z")

</div>

2009/10/2 Boar [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> what is the proper way to make this work? Â --force-plural doesn’t seem  
> to change the results. Â this only seems to happen when you choose  
> words that the plural and singular is the same word.
> 
> script/generate scaffold equipment name:string description:text  
> Â Â warning Â Plural version of the model detected, using singularized  
> version. Â Override with --force-plural.

Using a word like Equipment for a model seems like a bad idea, and is  
the root cause of your problem. One cannot have an equipment (in the  
real world I mean). If a row in the table represents one piece of  
equipment then you could call it Unit or EquipmentItem or something.  
If it actually represents a collection of items then call it an  
EquipmentSet or other word that indicates that it is a collection.  
You can tell that equipment is not a good word from the fact I do not  
know whether it represents a collection or a unit.

Colin
