I am working through the AWDwR4edp2-2. Chapter 8, page 92 has us add a line to routes.rb to redirect the root to the store’s index page. The comments use a different syntax, and I’m trying to understand why the book does it differently:
# You can have the root of your site routed with "root" # just remember to delete public/index.html. # root :to => 'welcome#index' root to: 'store#index', as: 'store'
So two questions: why use method #2? How can you add the ‘as: store’ part to method #1?