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