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