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. controller (and table) names are _______
nested classes
plural
created_at
public
2. tag that starts a form
config/routes.rb
<=> operator
<% form_for() %>
put a $ sign in front. For example $x
3. This method name indicates to rails that it should validate before saving/updating
put a $ sign in front. For example $x
render :partial
validate
validates_numericality_of
4. All constants are _______
integration
data migration (db/migrate/..._create_something.rb)
always public
HTTP methods (post - get - put - delete)
5. Converts database records to objects
an object-relational mapping library
#{1+1}
data migration (db/migrate/..._create_something.rb)
the class
6. Methods by default are ________
<=> operator
Embedded Ruby (ERb)
public
ruby make
7. A script that alters the structure of the underlying database
helper method
migration
ActiveRecord
ActiveRecord
8. This is a comparison operator
#{1+1}
Tweet.find(2).destroy
<=> operator
always public
9. tag that starts a form
replace the word "scaffold" with the word "model"
<% form_for() %>
HTTP methods (post - get - put - delete)
underscores
10. The "format" in "repond_to do |format|"? is a ______
nested classes
a responder object
the class
config/routes.rb
11. to generate regular model code (not scaffolding)
an object-relational mapping library
replace the word "scaffold" with the word "model"
Structs
CamelCase
12. to specify a format like html or xml in routes.rb
polymorphism
production
.:format
the class
13. to declare global variables
put a $ sign in front. For example $x
public
the word "private"
HTTP methods (post - get - put - delete)
14. Long form of "rake" which can do more complex things like modifying the database structure and running testsis
validates_numericality_of
f.error_messages
Structs
ruby make
15. Embedded Ruby (ERb) processes data from model objects AND _______ as inputs
the page template
include modulename
attr_accessor
data migration (db/migrate/..._create_something.rb)
16. to declare global variables
Modules
always public
put a $ sign in front. For example $x
polymorphism
17. The three kinds of tests are: unit and functional and _________ tests
integration
attr_accessor
helper method
.:format
18. declaring classes inside another class
Embedded Ruby (ERb)
validate
rake db:migrate
nested classes
19. to get character from ascii value
puts 12.chr
always public
f.error_messages
<=> operator
20. the second uri indicate
underscore
:controller
the page template
include modulename
21. This method name indicates to rails that it should validate before saving/updating
CamelCase
the page template
validate
rake db:migrate
22. This variable changes the environment
puts 12.chr
RAILS_ENV (RAILS_ENV=production)
Modules
the word "private"
23. You add the filter code right after the line introducing __________ in the controller
f.error_messages
runs its validators
config/routes.rb
the class
24. Converts database records to objects
#{1+1}
always public
an object-relational mapping library
#{1+1}
25. a RESTful application uses ... to define an interaction with the data.
HTTP methods (post - get - put - delete)
a responder object
.:format
:controller
26. express error messages in a form (do |f|)
f.error_messages
always public
plural
<=> operator
27. express error messages in a form (do |f|)
underscores
runs its validators
replace the word "scaffold" with the word "model"
f.error_messages
28. to specify a format like html or xml in routes.rb
<=> operator
polymorphism
always public
.:format
29. Rails' application framework
ActionPack
puts 12.chr
Embedded Ruby (ERb)
CamelCase
30. Default Rails environments: development - test - ________
production
integration test
validate
ActiveRecord
31. Naming convention for classes
runs its validators
validate
:controller
CamelCase
32. A search form is not associated with a ______
model
ruby make
f.error_messages
an object-relational mapping library
33. Unlike regular erb files partials' names begin with an ________
polymorphism
errors.add_to_base("there was an error")
underscore
Structs
34. the three "magic columns" are:id - _______ - updated_at
created_at
runs its validators
rake db:migrate
Modules
35. to add an error (called "there was an error") in the validate method
attr_accessor
helper method
errors.add_to_base("there was an error")
ActionPack
36. the three "magic columns" are:id - _______ - updated_at
created_at
f.error_messages
config/routes.rb
RAILS_ENV (RAILS_ENV=production)
37. models have only ______names
render :partial
singular
migration
always public
38. Before it saves or updates data a model object _______
production
the page template
runs its validators
plural
39. Allows instance variables to be accessible outside the class by defining = operators for variables
nested classes
validate
attr_accessor
validates_numericality_of
40. It generates web pages from page templates
Embedded Ruby (ERb)
Tweet.find(2).destroy
CamelCase
attr_accessor
41. These create namespaces
errors.add_to_base("there was an error")
.:format
Modules
Tweet.find(2).destroy
42. Long form of "rake" which can do more complex things like modifying the database structure and running testsis
ruby make
Tweet.find(2).destroy
an object-relational mapping library
runs its validators
43. the second uri indicate
:controller
Structs
config/routes.rb
ruby make
44. the concept of writing code that can work with objects of multiple types and classes at once
created_at
put a $ sign in front. For example $x
polymorphism
ActionPack
45. The "format" in "repond_to do |format|"? is a ______
helper method
Structs
always public
a responder object
46. to call a partial
migration
runs its validators
render :partial
data migration (db/migrate/..._create_something.rb)
47. Default Rails environments: development - test - ________
production
render :partial
<% form_for() %>
Structs
48. A special class whose only job is to have attributes and to hold data
Tweet.find(2).destroy
Structs
the word "private"
puts ?x where x is the character (not variable)
49. Embedded Ruby (ERb) processes data from model objects AND _______ as inputs
the page template
production
validates_numericality_of
integration test
50. Kinds of test you create yourself
#{1+1}
integration test
underscore
put a $ sign in front. For example $x