1.  It’s a test that simulates a browser accessing our application.

2.  The “erb” stands for “Embedded RuBy”. .erb files look like about.html.erb and live in the “views” directory.They are just html files with embedded ruby in them.

3.  Ruby complains if we try to evaluate an undefined local variable, but issues no such complaint for an instance variable; instead, instance variables are nil if not defined

4.  The @ indicates that this is an “instance variable”. An instance variable defined in the action (or function) of a controller is automatically available in the view of that same name.

4
Correct Answer :

The @ indicates that this is an “instance variable”. An instance variable defined in the action (or function) of a controller is automatically available in the view of that same name.


Explanation :
No Explanation available for this question

1.  When a request is made for, say, /pages/home, the Pages controller executes the code in the “home” action and then automatically renders the view corresponding to the action — in this case, home.html.erb.

2.  This maps requests for the URL /pages/home to the home action in the Pages controller.

3.  When the order matters, use an array.

4.  It’s a test that simulates a browser accessing our application.

4
Correct Answer :

This maps requests for the URL /pages/home to the home action in the Pages controller.


Explanation :
No Explanation available for this question

1.  Ruby complains if we try to evaluate an undefined local variable, but issues no such complaint for an instance variable; instead, instance variables are nil if not defined

2.  Symbols look kind of like strings, but prefixed with a colon instead of surrounded by quotes. For example, :name is a symbol. You can think of symbols as basically strings without all the extra baggage

3.  An array uses indices and a hash uses “keys”

4.  This is not a standard rails directory, but a directory installed by RSpec in which all test files are kept.

4
Correct Answer :

Symbols look kind of like strings, but prefixed with a colon instead of surrounded by quotes. For example, :name is a symbol. You can think of symbols as basically strings without all the extra baggage


Explanation :
No Explanation available for this question

1.  300

2.  200

3.  400

4.  150

4
Correct Answer :

200


Explanation :
No Explanation available for this question

1.  When the order matters, use an array.

2.  An array uses indices and a hash uses “keys”

3.  It’s a test that simulates a browser accessing our application.

4.  puts (pronounced “put-ess”)

4
Correct Answer :

puts (pronounced “put-ess”)


Explanation :
No Explanation available for this question

1.  An array uses indices and a hash uses “keys”

2.  When a request is made for, say, /pages/home, the Pages controller executes the code in the “home” action and then automatically renders the view corresponding to the action — in this case, home.html.erb.

3.  This maps requests for the URL /pages/home to the home action in the Pages controller.

4.  When the order matters, use an array.

4
Correct Answer :

When a request is made for, say, /pages/home, the Pages controller executes the code in the “home” action and then automatically renders the view corresponding to the action — in this case, home.html.erb.


Explanation :
No Explanation available for this question

1.  This maps requests for the URL /pages/home to the home action in the Pages controller.

2.  The request hits the rails router which dispatches to the proper controller action. In this case, it goes to the index action in the Users controller.

3.  Curly braces or do..end. It’s best to use curly braces for short one-line blocks and the do..end for mult-iline blocks.

4.  When the order matters, use an array.

4
Correct Answer :

Curly braces or do..end. It’s best to use curly braces for short one-line blocks and the do..end for mult-iline blocks.


Explanation :
No Explanation available for this question

1.  It’s a test that simulates a browser accessing our application.

2.  When the order matters, use an array.

3.  puts (pronounced “put-ess”)

4.  An array uses indices and a hash uses “keys”

4
Correct Answer :

It’s a test that simulates a browser accessing our application.


Explanation :
No Explanation available for this question

1.  This maps requests for the URL /pages/home to the home action in the Pages controller.

2.  A controller is a container for a group of (possibly dynamic) web pages

3.  When the order matters, use an array.

4.  Other than the object “false” itself, nil is the only object that defaults to false.

4
Correct Answer :

Other than the object “false” itself, nil is the only object that defaults to false.


Explanation :
No Explanation available for this question

1.  Ruby complains if we try to evaluate an undefined local variable, but issues no such complaint for an instance variable; instead, instance variables are nil if not defined

2.  Symbols look kind of like strings, but prefixed with a colon instead of surrounded by quotes. For example, :name is a symbol. You can think of symbols as basically strings without all the extra baggage

3.  This is not a standard rails directory, but a directory installed by RSpec in which all test files are kept.

4.  This maps requests for the URL /pages/home to the home action in the Pages controller.

4
Correct Answer :

This is not a standard rails directory, but a directory installed by RSpec in which all test files are kept.


Explanation :
No Explanation available for this question

Interview Questions

MongoDB
Java Script
Node JS
PHP
JQuery
Python