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