After running rails generate controller home index in my Rails application, I see this line in routes.rb
get "home/index"
What does this line do? When I removed it, I didn’t observe any difference it makes.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
see the Rails Routing page for more info but…
It adds, to the routing table, an entry to direct a
GETrequest of the formTo the
HomeController#indexaction, which will render a response and display the results to the user.It is a shorthand notation for
To see what other routes your application has available, run the following from a terminal while inside your projects directory