In my rails app, I added the model TreeNursery
, then added in routes.rb resources :tree_nurseries do...
.
The first problem that I've got is that when I added has_many :tree_nurseries
to the Village
model, rails couldn't map it before I added :class_name => 'TreeNursery'
.
After that, when I do rake routes
I get tree_nurseries_index
which is very weird for me.
Is there any clue for this ?
You can specify your own custom inflector. This should help guide you along: How do I override rails naming conventions?