# Weird named routes&pluralization problem

**URL:** <https://www.ruby-forum.com/t/weird-named-routes-pluralization-problem/151760>\
**Category:** Rails\
**Created:** [October 25, 2008, 7:09am UTC](https://www.ruby-forum.com/t/weird-named-routes-pluralization-problem/151760 "2008-10-25T07:09:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinay](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/6a8cbe/32.png) [@vinay](https://www.ruby-forum.com/u/vinay)\
**Post date:** [October 25, 2008, 7:09am UTC](https://www.ruby-forum.com/t/weird-named-routes-pluralization-problem/151760/1 "2008-10-25T07:09:09Z")

</div>

Hi all,  
I have these models  
Account has\_many :taxes  
Tax belongs\_to :account  
And the tax resource is nested inside the account resource like so  
map.resources :accounts do |account|  
account.resources :taxes, :name\_prefix =\> nil  
…#more resources here  
end  
Now when I rake the routes for Tax using rake routes|grep Tax in  
Terminal, these are the named routes  
taxes GET /accounts/:account\_id/  
taxes {:controller=\>“taxes”, :action=\>“index”}  
formatted\_taxes GET /accounts/:account\_id/taxes.:format  
{:controller=\>“taxes”, :action=\>“index”}  
POST /accounts/:account\_id/  
taxes {:controller=\>“taxes”, :action=\>“create”}  
POST /accounts/:account\_id/  
taxes.:format {:controller=\>“taxes”, :action=\>“create”}  
new\_taxis GET /accounts/:account\_id/taxes/new  
{:controller=\>“taxes”, :action=\>“new”}  
formatted\_new\_taxis GET /accounts/:account\_id/taxes/new.:format  
{:controller=\>“taxes”, :action=\>“new”}  
edit\_taxis GET /accounts/:account\_id/taxes/:id/  
edit {:controller=\>“taxes”, :action=\>“edit”}  
formatted\_edit\_taxis GET /accounts/:account\_id/taxes/:id/  
edit.:format {:controller=\>“taxes”, :action=\>“edit”}  
taxis GET /accounts/:account\_id/  
taxes/:id {:controller=\>“taxes”, :action=\>“show”}  
formatted\_taxis GET /accounts/:account\_id/  
taxes/:id.:format {:controller=\>“taxes”, :action=\>“show”}  
PUT /accounts/:account\_id/  
taxes/:id {:controller=\>“taxes”, :action=\>“update”}  
PUT /accounts/:account\_id/  
taxes/:id.:format {:controller=\>“taxes”, :action=\>“update”}  
DELETE /accounts/:account\_id/  
taxes/:id {:controller=\>“taxes”, :action=\>“destroy”}  
DELETE /accounts/:account\_id/  
taxes/:id.:format {:controller=\>“taxes”, :action=\>“destroy”}  
You can see that the ‘edit’ and ‘new’ routes which are for a single  
record of the Tax model are generated as ‘new\_taxis’ and 'edit\_taxis"  
path for some reason instead of ‘new\_tax’ and ‘edit\_tax’ . I simply  
used these routes instead but now im getting other errors. For eg.,  
when i try to do current\_account.taxes, i get the following error  
“uninitialized constant Account::Taxis”  
I cant make out what the problem is and how it came up. Hoping someone  
can help me find a solution.
