So i've looked around and don't see a built in way to handle words that are named weirdly in the english language.
I have a Quiz model, which means that i have an index action of \quizes.
resources 'quizes', only: ['index', 'new', 'show']
I would like to be able to do things like
quizes_path #Note this one works
quiz_path(:id) #this does not
I have to do quize_path(:id)
Here is the rake routes, notice that the path names are quize instead of quiz.
quizes GET /quizes(.:format) quizes#index
new_quize GET /quizes/new(.:format) quizes#new
quize GET /quizes/:id(.:format) quizes#show
This is more for learning. I know i could just manually specify the singular resources and be done.
The ultimate question, is there a way to specify this in resources so that it knows that the singluar resources should remove 'es' instead of just 's'
EDIT
Here is the correct inflector based on the resources. Thanks!
ActiveSupport::Inflector.inflections(:en) do |inflect| inflect.singular /^(quiz)es/i, '\1' end