In my project I have a class called City and I have created the aliases BirthCity and ResidenceCity. I want to change the routes.rb file in the correct way.
I've tried adding
resources :birth_cities, :path => :cities, as: => :cities
resources :residence_cities, :path => :cities, as: => :cities
Every time I call birth_city_path, I want it to be referenced to city_path. But I'm getting the following error:
syntax error, unexpected => (SyntaxError)
...ties, :path => :cities, as: => :cities
... ^~
Any ideas? I've also tried modified it like this:
resources :birth_cities,:path => :cities,:as 'cities'
but it doesn't work anyway.
EDIT: now the sintax is corret but I'm getting another error
undefined method `birth_cities_path' for #<#<Class:0x00007f4b3cfcd6c0>:0x00007f4b21303950>
for the following line
<%= guiFieldAutocomplete(f, :birth_city_id, { data: { autocomplete_source: birth_cities_path(col: "json_recordset_name") }}) %>