Recall & Review
beginner
What command do you use to create a new Rails application?
You use
rails new app_name to create a new Rails application, where app_name is your project folder name.Click to reveal answer
beginner
What file runs the Rails server to see your app in a browser?
You run
rails server or rails s in your app folder to start the server. Then visit http://localhost:3000 in your browser.Click to reveal answer
beginner
What is the purpose of the
app/views folder in a Rails app?The
app/views folder holds the HTML templates that show the user interface. Rails fills these templates with data to display pages.Click to reveal answer
beginner
What does MVC stand for in Rails?
MVC means Model-View-Controller. It's a way Rails organizes code: Models handle data, Views show pages, Controllers manage requests.
Click to reveal answer
beginner
How do you generate a new controller in Rails?
Use
rails generate controller ControllerName to create a new controller and its view files.Click to reveal answer
Which command starts the Rails server?
✗ Incorrect
The correct command to start the Rails server is
rails server or rails s.Where do you put HTML templates in a Rails app?
✗ Incorrect
HTML templates go inside
app/views to show pages to users.What does MVC stand for?
✗ Incorrect
MVC stands for Model-View-Controller, the design pattern Rails uses.
How do you create a new Rails app named 'blog'?
✗ Incorrect
Use
rails new blog to create a new Rails app called 'blog'.Which folder contains the code that handles user requests?
✗ Incorrect
Controllers in
app/controllers handle user requests and decide what to do.Explain the steps to create and run your first Rails application.
Think about commands and what you do to see your app in a browser.
You got /4 concepts.
Describe the MVC pattern and how Rails uses it in your first app.
Imagine a restaurant: who cooks, who serves, who takes orders?
You got /4 concepts.