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