You used to be able to do:
resources :paises, :singular => :pais
But I tried this in Rails and it didn't work. I want to have 'pais_path()' for show and 'paises_path()' for index.
thanks
You used to be able to do:
resources :paises, :singular => :pais
But I tried this in Rails and it didn't work. I want to have 'pais_path()' for show and 'paises_path()' for index.
thanks
open your config/initializers/inflections.rb
file and add this
ActiveSupport::Inflector.inflections do |inflect|
inflect.irregular 'pais', 'paises'
end
then your route resources :paises
will work for you as expected