๐Ÿงช Ruby on Rails MCQ Quiz Hub

Ruby on Rails Multiple choice Questions Set 2

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

what are the main principles of REST?





โœ… Correct Answer: 1

When is it best to use an array rather than a hash?





โœ… Correct Answer: 4

.Describe the TDD cycle.





โœ… Correct Answer: 3

How does a local variable differ from an instance variable when empty?





โœ… Correct Answer: 4

What is a .erb file?





โœ… Correct Answer: 1

What's the best way to describe an object in Ruby?





โœ… Correct Answer: 2

What is a Class?





โœ… Correct Answer: 2

What kind of object is "@title" and what is special about it in Rails?





โœ… Correct Answer: 4

.What does the routes.rb file do with "get pages/home"?





โœ… Correct Answer: 2

Describe a "symbol" in Rails?





โœ… Correct Answer: 2

What is the status code for "success" when throwing a GET?





โœ… Correct Answer: 2

What is the command to print to the screen?





โœ… Correct Answer: 4

What is the main benefit that a Class gets by inheritance from ApplicationController?





โœ… Correct Answer: 2

Name two ways to indicate a "block" in Rails





โœ… Correct Answer: 3

What is an integration test?





โœ… Correct Answer: 1

What is the most special aspect of nil?





โœ… Correct Answer: 4

What is the /spec directory in rails?





โœ… Correct Answer: 3

What's the difference between a hash and an array?





โœ… Correct Answer: 1

What is a controller?





โœ… Correct Answer: 1

how do you define a "status" parameter (within a "tweet" parameter)?





โœ… Correct Answer: 4

.how do you check the logged in user's id?





โœ… Correct Answer: 2

let's say you have a method... def get_tweet @tweet = Tweet.find(params[:id]) end how do you tie an action to that that only kicks in for the edit, update, and destroy methods?





โœ… Correct Answer: 3

How to includes all javascript?





โœ… Correct Answer: 2

what do you use to send messages to the user?





โœ… Correct Answer: 3

.how includes all stylesheet files?





โœ… Correct Answer: 4

how do you make sure your forms don't get hacked?





โœ… Correct Answer: 2

how do you make a link to a zombie's profile with the text of a zombies name?





โœ… Correct Answer: 1

how do you do validate to ensure ":status" exists and that it's length is at least 3 long?





โœ… Correct Answer: 1

what code generates the url "/tweets/new"? (action = new tweet form)





โœ… Correct Answer: 3

How to create multiple hashes inside "params" (like "status" within "tweet")?





โœ… Correct Answer: 1

.how do you make a link?





โœ… Correct Answer: 3

what code generates the url "/tweets"?





โœ… Correct Answer: 4

what do you write to indicate that a tweet from table "tweets" only belongs to one zombie? (from table "zombies")? a) class Tweet validates_presence_of :status end





โœ… Correct Answer: 3

.show errors in object "t"





โœ… Correct Answer: 3

what file corresponds to the "show" method





โœ… Correct Answer: 2

what does "erb" stand for in file_name.erb?





โœ… Correct Answer: 2

what is partial page templates (or partials)?





โœ… Correct Answer: 4

What is scriptlet?





โœ… Correct Answer: 1

----sets the location and type of your databbase as well as a few other settings (like how long messages will be recorded)





โœ… Correct Answer: 4

how you start a form that matches a model object?





โœ… Correct Answer: 3

how you start a form that doesn't match a model object





โœ… Correct Answer: 2

which web application that integrates data and services from other places on the web





โœ… Correct Answer: 4

how is authenticity token works?





โœ… Correct Answer: 4

In Rails, a test of a model class is called ----------------.





โœ… Correct Answer: 4

In Rails, a test of an individual controller is called ------------------.





โœ… Correct Answer: 2

what test that tests the whole system?





โœ… Correct Answer: 3

A form bound to a model object is called -------.





โœ… Correct Answer: 2

what is called a set of test data?





โœ… Correct Answer: 2

what is a layout?





โœ… Correct Answer: 4

What is Ruby on Rails?





โœ… Correct Answer: 1

.Who wrote Ruby on Rails?





โœ… Correct Answer: 3

.Does Ruby on Rails make app development easier?





โœ… Correct Answer: 1

What does DRY mean?





โœ… Correct Answer: 2