I'm getting the following error when I routing in my app
Routing Error
No such page: pages/contact
The page does exist, I've noticed in the URL it says:
http://localhost:3000/pages/pages/contact So rendering double /pages/
Routes.rb
Rails.application.routes.draw do
get 'pages/index' => 'high_voltage/pages#show', id: 'index'
root :to => 'high_voltage/pages#show', id: 'index'
end
html.erb
<%= link_to 'pages/contact', :class => 'btn btn--sm btn--primary type--uppercase' do %>
It's important to note if I'm routing from index -> contact it's fine, however, if I route from another internal page such as about or team, it will double render in the URL
TIA