Rails Basics

Beschreibung

Karteikarten am Rails Basics, erstellt von minoru.cm am 15/10/2015.
minoru.cm
Karteikarten von minoru.cm, aktualisiert more than 1 year ago
minoru.cm
Erstellt von minoru.cm vor etwa 9 Jahre
38
1

Zusammenfassung der Ressource

Frage Antworten
What does the command 'pwd' do when executed in an terminal? This command display the current directory that a user is located in.
What does the command 'ls' does when executed in an terminal? This command list the files & folders that are located in the directory that the user is currently in.
What does the command 'cd' does when executed in an terminal? This command allows a user to move from one directory to another.
What does the command 'cd ..' does when executed in an terminal? This command allows a user to move back to the previous directory.
What does the command 'mkdir' does when executed in an terminal? This command is used to create a directory.
What does the command 'rails -v' does when executed in an terminal? This command displays the version of Rails installed.
What does the command 'ruby-v' does when executed in an terminal? This command displays the version of Ruby installed.
What is the command that is used to create an application in Rails? rails new name_of_application
After creating an application in Rails what are the steps that are regarded for the application to work? Go to the directory of the application and then run the 'bundle install' command.
What command is used to install gems that are in the application Gemfile? The 'bundle install' command.
What is an gem? A gem refers to a pre-packaged code that adds functionality to an application.
What is the Gemfile? The Gemfile consist of gems that are installed from a network server and used in an application.
What is the command that is used to start an Rails server? The command is 'rails server'
How does one exit an rails server? This done by pressing ctrl+c
What is scaffolding? This refers to creating the MVC files with the use of a single line command.
What is the syntax of a rails scaffolding? rails generate scaffold name_of_object
Give an example of creating scaffold object name products that have an attribute name description and data type of text rails generate scaffold Products description: text
What is MVC? MVC stands for Model, View & Controller
Define each acronym of MVC Model - is responsible for managing the application data. It takes request from the 'View" and instructions from the "Controller" about updating itself. It is located in the apps/model folder. View - is responsible for presenting the data in a particular format. It is triggered by the "Controller" decision to present data. It is located in the apps/views folder. Controller - is responsible for responding to a user inputs & performs interactions with data model objects. It is located in the apps/controller folder.
Explain the following diagram The diagram represents the process of MVC. The 'Controller' receives user inputs as a result the 'Controller' seeks data from the 'Model' which will be passed to the 'View' to present the data
Ones scaffold is created there are four files that consist of placeholder codes. These files are placed views/name_of_object folder. What are these files and state there use. Index - shows all data. Show - shows a single data. New - contain a blank form with fields that are used to data in a database. Edit - used to update details.
What command is used to create a database that stores data? The command is 'rake db:migrate'
How does one change the homepage of a rails server? This is done by placing " root 'name_of_object#index' " under "resources :name_of_object" in the config/routes.rb file.
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Fragen über die englischen Kolonien in Nordamerika
Julian 1108
Lernplan
barbarabfm
Was darf mit ins Flugzeug?
B G
Un secret - Ein Geheimnis von Philippe Grimbert
Laura Overhoff
Tiefergreifendes Lernen - Wie umsetzen?
Laura Overhoff
Analysis - Abiturvorbereitung Mathe
c.aciksoez
Mediation
Antonia C
ALDI SUISSE PLU: Kernsortiment 01 - 99
Sarah Huber
Verwitterung Transport und Sedimentation
Weltraumkatze Fanroth
vetie mibi Altfragen 2019
Anne Heyne
Chirurgie Schwein Vetie
Anne Käfer