I recently just ran into this issue and am curious as to why this happens… I have a resource and went to add a new member route onto it. I ended up with something that looks like this:
resources :wikis do member do get 'new', to: 'wiki_pages#new' end end
After this, one of my urls broke. This helper:
Went from returning
/wiki/1/new… but! If I add a leading slash it doesn’t override the helper method. This is currently working as expected (helper method returns
/wiki/1)… but why?
resources :wikis do member do get '/new', to: 'wiki_pages#new' end end