I have a very simple view link_to problem no error message just a strange dot in url “http://0.0.0.0:3000/.Hire” not sure why the dot is there between the root url and Hire?
link_to:
<%= link_to page.name, root_url(page.name) %>
The routes are fine if I type manually: http://0.0.0.0:3000/Hire
I get taken to the right page but the link_to is just wrong.
I would be grateful for any help.
Many thanks
Dan
root_urlisn’t supposed to be given this kind of parameters. It’s logic it’s failing.Run
rake_routesin your console to get the proper names of your routes.One ugly workaround to fit your needs would be:
One last question: why do you use
root_urlinstead ofroot_path?The former tend to uselessly pollute the views.