I have route root to pages#index, but that kinda messed up my navigation, so that when I pres for instace about I get No route matches [GET] "/about"
and since I am new to rails I kinda need at bit of help, because I have tried finding a solution at stackoverflow and google eith out success.
My navigation menu is like this:
<nav> <b><%= link_to "INDEX", 'index' %></b> <b><%= link_to "BLOG", '/blog' %></b> <b><%= link_to "PORTFOLIO", 'portfolio' %></b> <b><%= link_to "ME", 'me' %></b> <b><%= link_to "ABOUT", 'about' %></b> </nav>
My routing to index is like this in config/routes.db:
WebApp::Application.routes.draw do resources :posts get "pages/index" get "pages/blog" get "pages/portfolio" get "pages/me" get "pages/about" root :to => "pages#index" end
What i thought I should do and what I found on stackoverflow was to replace for instance:
match '/blog', to: 'pages#blog'
But when I do this happens:
/Users/tools/h4xcode/web_app/config/routes.rb:8: syntax error, unexpected ':', expecting kEND match '/blog', to: 'pages#blog'
Can you give me a nock in the right direction or perhaps even a soloution?