Complete the code to define a root route pointing to the home controller's index action.
root to: '[1]'
The root route should point to the controller and action in the format "controller#action". Here, "home#index" means the index action of the home controller.
Complete the code to define RESTful routes for the articles resource.
resources :[1]The 'resources' method defines RESTful routes for the given resource name. Here, we want routes for 'articles'.
Fix the error in the custom route definition to map GET /profile to users controller's show action.
get '/profile', to: '[1]'
The route should map to the 'show' action of the 'users' controller, so the correct format is "users#show".
Fill both blanks to define a named route 'login' that maps GET /login to sessions controller's new action.
get '/login', to: '[1]', as: '[2]'
The route maps to the 'new' action of the 'sessions' controller, and the route is named 'login' for easy reference.
Fill all three blanks to define a nested resource where comments belong to posts.
resources :[1] do resources :[2], only: [:[3]] end
This defines nested routes where 'comments' are nested inside 'posts', and only the 'create' action is available for comments.