0

How can I rename my routes in rails, My original route is

get 'pages/fonctionnalites'

I tried to rename it like this to have only /fonctionnalites in my url :

get 'fonctionnalites' => 'pages#fonctionnalites'

My nav looks like this :

<div class="nav__panel">
    <ul class="nav__links">
        <li>
            <%= link_to 'Fonctionnalités',fonctionnalites_path, class: "nav__link" %>
        </li>
    </ul>
</div>

But when I do so, when I click on the link, my page is not reloaded so the link goes nowhere, any idea how to rename it and reload the page to have content ?

Damien Compère
  • 219
  • 1
  • 3
  • 16

0 Answers0