To create a link to another page in rails you use the ‘link_to’ method and pass in the internal path of the page.
I have a view called about.html.er in my static_pages folder in views, so to link to this from another view I would use:
<%= link_to (“Text you want to appear”, folder-name_view-name_path) %>
In my case it looked like this:
<%= link_to("Home", static_pages_home_path) %> If I'm building out a nav bar this would be the following:
<nav> <ul> <li> <%= link_to("home", static_pages_home_path) %> </li> <li> <%= link_to("About", static_pages_about_path_path) %> </li> </ul> </nav> This currently sits in the layouts/application.html.erb and because it's static and unlikely to change it's best to move it to a partial, but that's another post.