0
0
Ruby on Railsframework~5 mins

First Rails application - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Arails server
Brails start
Crails run
Drails begin
Where do you put HTML templates in a Rails app?
Aapp/models
Bapp/controllers
Capp/views
Dapp/assets
What does MVC stand for?
AModule-View-Controller
BModel-View-Controller
CModel-Visual-Component
DMain-View-Code
How do you create a new Rails app named 'blog'?
Arails create blog
Brails start blog
Crails init blog
Drails new blog
Which folder contains the code that handles user requests?
Aapp/controllers
Bapp/models
Capp/views
Dconfig
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.