I generated a controller and changed the routes but opening the links yields errors on my local server.
Generating controller and routes
You can use match
, you've gotta add a via:
option:
match '/about', to: 'static_pages#about', via: :get
match '/team', to: 'static_pages#team', via: :get
match '/contact', to: 'static_pages#contact', via: :get
You can also pass other HTTP verbs to via:
if you need to, like via: [:get, :post]
Source: Rails Routing Guide