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