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