SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Ruby On Rails Basics
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. A search form is not associated with a ______
model
nested classes
Structs
the word "private"
2. a RESTful application uses ... to define an interaction with the data.
HTTP methods (post - get - put - delete)
Embedded Ruby (ERb)
errors.add_to_base("there was an error")
ActiveRecord
3. the model-generator command create the model class (app/models/something.rb) and the ____________
production
errors.add_to_base("there was an error")
created_at
data migration (db/migrate/..._create_something.rb)
4. This is a comparison operator
<%= yield %>
<=> operator
ActiveRecord
render :partial
5. Embedded Ruby (ERb) processes data from model objects AND _______ as inputs
Embedded Ruby (ERb)
Tweet.find(2).destroy
replace the word "scaffold" with the word "model"
the page template
6. to generate regular model code (not scaffolding)
replace the word "scaffold" with the word "model"
singular
an object-relational mapping library
nested classes
7. to check if an input is numeric
put a $ sign in front. For example $x
validates_numericality_of
include modulename
helper method
8. declaring classes inside another class
.:format
ActionPack
nested classes
underscores
9. Allows instance variables to be accessible outside the class by defining = operators for variables
attr_accessor
Tweet.find(2).destroy
integration test
puts ?x where x is the character (not variable)
10. to get ascii value of a character
underscore
puts ?x where x is the character (not variable)
plural
rake db:migrate
11. Command to run a migration
integration
puts ?x where x is the character (not variable)
underscore
rake db:migrate
12. the second uri indicate
Embedded Ruby (ERb)
migration
:controller
render :partial
13. The three kinds of tests are: unit and functional and _________ tests
errors.add_to_base("there was an error")
CamelCase
HTTP methods (post - get - put - delete)
integration
14. the three "magic columns" are:id - _______ - updated_at
<% form_for() %>
an object-relational mapping library
created_at
helper method
15. to generate regular model code (not scaffolding)
ActionPack
production
nested classes
replace the word "scaffold" with the word "model"
16. These create namespaces
Modules
errors.add_to_base("there was an error")
ActionPack
runs its validators
17. Converts database records to objects
put a $ sign in front. For example $x
data migration (db/migrate/..._create_something.rb)
an object-relational mapping library
<%= yield %>
18. Long form of "rake" which can do more complex things like modifying the database structure and running testsis
integration test
validates_numericality_of
Tweet.find(2).destroy
ruby make
19. Naming convention for file names
#{1+1}
Structs
underscores
errors.add_to_base("there was an error")
20. A special class whose only job is to have attributes and to hold data
the page template
Structs
plural
an object-relational mapping library
21. A script that alters the structure of the underlying database
the word "private"
migration
public
Structs
22. expression that all layouts have
rails generate migration AddPhoneToTickets phone:string
<%= yield %>
rake db:migrate
errors.add_to_base("there was an error")
23. to destroy a row with id of 2 using only one line...
puts ?x where x is the character (not variable)
<=> operator
attr_accessor
Tweet.find(2).destroy
24. All constants are _______
always public
integration test
helper method
polymorphism
25. Naming convention for classes
ActionPack
the word "private"
CamelCase
model
26. to get character from ascii value
<% form_for() %>
validates_numericality_of
model
puts 12.chr
27. Allows instance variables to be accessible outside the class by defining = operators for variables
#{1+1}
<=> operator
Embedded Ruby (ERb)
attr_accessor
28. a RESTful application uses ... to define an interaction with the data.
created_at
runs its validators
put a $ sign in front. For example $x
HTTP methods (post - get - put - delete)
29. Before it saves or updates data a model object _______
plural
errors.add_to_base("there was an error")
an object-relational mapping library
runs its validators
30. A special class whose only job is to have attributes and to hold data
Embedded Ruby (ERb)
Structs
plural
replace the word "scaffold" with the word "model"
31. Before it saves or updates data a model object _______
polymorphism
data migration (db/migrate/..._create_something.rb)
Tweet.find(2).destroy
runs its validators
32. A search form is not associated with a ______
model
validates_numericality_of
include modulename
validate
33. to run the latest migrations
#{1+1}
validate
rake db:migrate
the page template
34. Long form of "rake" which can do more complex things like modifying the database structure and running testsis
ruby make
attr_accessor
model
#{1+1}
35. to insert "1 + 1" into a string
the class
<% form_for() %>
#{1+1}
production
36. Naming convention for classes
errors.add_to_base("there was an error")
data migration (db/migrate/..._create_something.rb)
CamelCase
rake db:migrate
37. The three kinds of tests are: unit and functional and _________ tests
the page template
created_at
integration
integration test
38. the model-generator command create the model class (app/models/something.rb) and the ____________
validate
data migration (db/migrate/..._create_something.rb)
ActiveRecord
errors.add_to_base("there was an error")
39. the concept of writing code that can work with objects of multiple types and classes at once
runs its validators
<% form_for() %>
replace the word "scaffold" with the word "model"
polymorphism
40. It generates web pages from page templates
ActionPack
Embedded Ruby (ERb)
<%= yield %>
put a $ sign in front. For example $x
41. Methods by default are ________
ActiveRecord
integration
public
include modulename
42. Command to run a migration
rake db:migrate
plural
integration
integration test
43. Unlike regular erb files partials' names begin with an ________
the class
attr_accessor
integration
underscore
44. the concept of writing code that can work with objects of multiple types and classes at once
ruby make
polymorphism
an object-relational mapping library
integration test
45. This precedes the "check_logged_in" method in a class
replace the word "scaffold" with the word "model"
<%= yield %>
the word "private"
validates_numericality_of
46. Converts database records to objects
:controller
an object-relational mapping library
rails generate migration AddPhoneToTickets phone:string
public
47. controller (and table) names are _______
validate
rake db:migrate
errors.add_to_base("there was an error")
plural
48. The "format" in "repond_to do |format|"? is a ______
a responder object
model
<%= yield %>
puts ?x where x is the character (not variable)
49. All constants are _______
the class
production
the word "private"
always public
50. It generates web pages from page templates
RAILS_ENV (RAILS_ENV=production)
ActiveRecord
Modules
Embedded Ruby (ERb)