Fork, clone, and write your answers directly in this file. Then submit a pull request.
I want to start a new Rails project/app called BunnyApp
. What command should I type in the terminal?
I want to create a new model called Bunny
, with the following attributes: name (string), color (string), and age (integer). What command(s) should I type in the terminal and/or Sublime? (In your answer, create both a migration and the model file.)
What does the command in Question 2 do, exactly? What files are created, where are they located, and what does the database look like at this time? Explain.
I want to create a database and make it reflect the new model I created in Question 2. What command(s) should I type in the terminal?
I want to look at the actual database that has been created. What command should I type in the terminal?
I want to see a list of all the URLs available in my app, along with the HTTP requests and controllers associated with them. What command should I type in the terminal?
What line should I add to config/routes.rb
to create a complete set of RESTful routes for a "bunnies" resource?
According to standard Rails conventions, what directory and filename would the BunniesController be located in, starting from the root of the project?
According to standard Rails conventions, what directory and filename would the "show" view for bunnies be located in, starting from the root of the project?
I have worked on my app and finally want to see it in action. What command should I type in the terminal, and where should I navigate to in my browser?