πŸ§ͺ Ruby on Rails MCQ Quiz Hub

Ruby on Rails Multiple choice Questions Set 1

Choose a topic to test your knowledge and improve your Ruby on Rails skills

What is bundler?





βœ… Correct Answer: 3

What is gemset?





βœ… Correct Answer: 1

What is gem?





βœ… Correct Answer: 2

what is scaffold command?





βœ… Correct Answer: 1

What is rake?





βœ… Correct Answer: 2

how do you create a migration that adds a "phone" field to the "tickets" table?





βœ… Correct Answer: 4

What is rvm?





βœ… Correct Answer: 2

Rails' application framework is called ----------?





βœ… Correct Answer: 1

how do you run a migration?





βœ… Correct Answer: 4

what does "show" refer to as the :action value?





βœ… Correct Answer: 1

how do you update?





βœ… Correct Answer: 1

what comes after <% form_for()... ?





βœ… Correct Answer: 4

what kind of tests are there?





βœ… Correct Answer: 1

how do you specify a format like html or xml in routes.rb?





βœ… Correct Answer: 1

when you put something into an array, does the array keep a separate copy?





βœ… Correct Answer: 1

what is scriptlet versus expression





βœ… Correct Answer: 4

what does the "h" in <%=h ... %> mean?





βœ… Correct Answer: 2

.what's the difference between model names and controller names?





βœ… Correct Answer: 3

what is "migration"?





βœ… Correct Answer: 2

what steps get you from fild.erb to file.html?





βœ… Correct Answer: 2

what is the filter code that calls on the "check_logged_in" method for only the "edit" and "update" methods?





βœ… Correct Answer: 4

representation of a resource is called -------------.





βœ… Correct Answer: 3

converts database records to objects is called -------------.





βœ… Correct Answer: 4

what checks if an input is numeric?





βœ… Correct Answer: 4

what is Rails' object-relational mapping library?





βœ… Correct Answer: 2

what is Rails' object-relational mapping library?





βœ… Correct Answer: 2

where do you add the filter code?





βœ… Correct Answer: 4

why is it good to redirect after inserting info into the database?





βœ… Correct Answer: 3

which two steps to include test.xml data to the partial "map" (via the variable "data")...?





βœ… Correct Answer: 2

what environments does Rails have by default?





βœ… Correct Answer: 1

how do you generate regular model code (not scaffolding)?





βœ… Correct Answer: 2

how should you order routes?





βœ… Correct Answer: 2

what should you write in routes.rb to give meaning to http://mebay.com/ads/3?





βœ… Correct Answer: 2

to add login security, which two pieces of code do you need?





βœ… Correct Answer: 4

how do partials look compared to regular erb files?





βœ… Correct Answer: 4

how does "rake" differ from "ruby"?





βœ… Correct Answer: 3

.why should partials generally use local variables?





βœ… Correct Answer: 1

do models have singular or plural names?





βœ… Correct Answer: 4

how does rake tell which migrations have been run and which have not?





βœ… Correct Answer: 2

how does Rails choose to correct format to generate?





βœ… Correct Answer: 1

how do you express error messages in a form (do |f|)?





βœ… Correct Answer: 2

.what are the three "magic columns"





βœ… Correct Answer: 1

what tag starts a form?





βœ… Correct Answer: 3

what is params[...]?





βœ… Correct Answer: 4

what comes after "def check_logged_in" line for site "ads"?





βœ… Correct Answer: 4

what is naming convention for classes?





βœ… Correct Answer: 2

to create scafolding for "thing" data, run...





βœ… Correct Answer: 4

what variable changes the environment?





βœ… Correct Answer: 1

what is naming convention for file names ?





βœ… Correct Answer: 2

why do you only need to call "render" in the controller sometimes and not always?





βœ… Correct Answer: 4

a RESTful application uses ... to define an interaction with the data.





βœ… Correct Answer: 3

what generates web pages from page templates?





βœ… Correct Answer: 2

where do you edit routs?





βœ… Correct Answer: 4

.if looping through β€œf” object, how do you make a text field β€œname”?





βœ… Correct Answer: 4

what does a model object do before it saves or updates data?





βœ… Correct Answer: 2

.what does "rake" mean?





βœ… Correct Answer: 3

.how do you start a loop that reads through the array object "@ads"?





βœ… Correct Answer: 3

what scripts does the model-generator command create?





βœ… Correct Answer: 2

what does Embedded Ruby (ERb) process as inputs?





βœ… Correct Answer: 1

what kind of test do you create yourself?





βœ… Correct Answer: 4

what is "format" in "repond_to do |format|"?





βœ… Correct Answer: 3

Ruby on Rails Multiple choice Questions





βœ… Correct Answer: 3

what parameters are in <% form_for() %>?





βœ… Correct Answer: 2

how do you add an error (called "there was an error") in the validate method?





βœ… Correct Answer: 2

how do you call a partial?





βœ… Correct Answer: 4

how do you run the latest migrations?





βœ… Correct Answer: 3

what's special about a search form?





βœ… Correct Answer: 2

what expression do all layouts have?





βœ… Correct Answer: 1

if the table Seats is associated with the table Flights, how should you name the table column in Seats to indicate its flight?





βœ… Correct Answer: 2

how would you insert "1 + 1" into a string?





βœ… Correct Answer: 2

what is the second uri indicate?





βœ… Correct Answer: 4

what precedes the "check_logged_in" method in a class?





βœ… Correct Answer: 2

what method name indicates to rails that it should validate before saving/updating?





βœ… Correct Answer: 1

how do you ask for all records of the Ads table?





βœ… Correct Answer: 2

.when data is retrieved from the database, what does Rails turn it into?





βœ… Correct Answer: 4