Complete the code to define a route that maps the URL '/home' to the 'index' action of the 'pages' controller.
get '/home', to: '[1]'
The route maps '/home' to the 'index' action in the 'pages' controller using 'pages#index'.
Complete the code to create a route that maps a GET request for '/products/:id' to the 'show' action in the 'products' controller.
get '/products/:id', to: '[1]'
The route maps a GET request with an ID parameter to the 'show' action of the 'products' controller.
Fix the error in the route that should map POST requests to '/users' to the 'create' action in the 'users' controller.
post '/users', to: '[1]'
POST requests to '/users' should map to the 'create' action in the 'users' controller, which is 'users#create'.
Fill both blanks to define a route that maps DELETE requests for '/articles/:id' to the 'destroy' action in the 'articles' controller.
[1] '/articles/:id', to: '[2]'
The HTTP method is 'delete' and the route points to 'articles#destroy' to delete an article.
Fill all three blanks to define a route that maps PATCH requests for '/profiles/:id' to the 'update' action in the 'profiles' controller with a named route helper 'profile_update'.
[1] '/profiles/:id', to: '[2]', as: '[3]'
The HTTP verb is 'patch', the route points to 'profiles#update', and the named route helper is 'profile_update'.