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