This project is archived and is in readonly mode.
Incorrect pluralization, can't fix with inflectors
-
Rohit Arondekar
Did you add the custom inflector code to config/initializers/inflections.rb ? If not please add it there and try again. Also do report back if it works.
-
Andrew White
Works for me:
# config/initializers/inflections.rb ActiveSupport::Inflector.inflections do |inflect| inflect.irregular 'niche', 'niches' endproduces:
andyw$ rake routes GET /niches(.:format) {:controller=>"niches", :action=>"index"} niches POST /niches(.:format) {:controller=>"niches", :action=>"create"} new_niche GET /niches/new(.:format) {:controller=>"niches", :action=>"new"} GET /niches/:id(.:format) {:controller=>"niches", :action=>"show"} PUT /niches/:id(.:format) {:controller=>"niches", :action=>"update"} niche DELETE /niches/:id(.:format) {:controller=>"niches", :action=>"destroy"} edit_niche GET /niches/:id/edit(.:format) {:controller=>"niches", :action=>"edit"} -
Rohit Arondekar
- State changed from new to invalid
Yes, it should work. I suspect krschacht added the inflections in config/environment.rb or somewhere else. Closing ticket, if it's still a problem make a comment and I'll reopen.