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