ruby - RailsTutorial.org Learning Rails 5.3.4 Layout link test -
the links in header won't work. code header file below.
what doing wrong? where's mistake? please help.
here's code app/views/layouts/_header.html.erb file:
<header class="navbar navbar-fixed-top navbar-inverse"> <br/> <div class="container"> <br/> <%= link_to "sample app", root_path, id: "logo" %> <br/> <nav> <br/> <ul class="nav navbar-nav navbar-right"> <br/> <li><%= link_to "home", root_path %></li> <br/> <li><%= link_to "help", help_path %></li> <br/> <li><%= link_to "log in", '#' %></li> <br/> </ul> <br/> </nav> <br/> </div> <br/> </header>
please check routes.rb file looks like. above header file looks fine me. must wrong routing.
i have looked @ tutorial website using , seems problem missing following 2 lines of code in config/routes.rb file...
root 'static_pages#home' 'help' => 'static_pages#help'
Comments
Post a Comment