Home > CompTIA A+ Exam > Quizzes > Ruby on Rails Fundamentals Test
Ruby on Rails Fundamentals Test
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 19% Most missed: “Where do you add named scopes?”
Ruby on Rails Fundamentals Test
Time left 00:00
25 Questions

1. Which is NOT an ActiveRecord migration method?
2. As of Rails 3 and later - where is the default location for code that does environment-specific configuration?
3. Determine the value of the variable a - b and c after the execution of the following code. a - b - c = 1 - 2 - 3 - 4
4. Which HTTP method is used by default when clicking a button defined using the ActionView helper method 'button_to'?
5. Which is not a valid callback?
6. What is the default value for a global variable (before initialization)?
7. When you've got a form - and when the user submits invalid data - you redirect back to the edit form. If you want to show a general error message (not tied to validation errors) to the user - you'd do which of the following?
8. If the class User has a belongs_to :role - which table has the foreign key?
9. Which is NOT an ActiveRecord query method?
10. If you want the /person url to map to your dog controller and show method - what do you add to your routes?
11. What kind of variables are Author and AUTHOR?
12. You've got a form - and when the user submits invalid data - you simply show them an error page (no redirect). In the controller - to show the general error on the rendered page - you would add:
13. Which column type is NOT supported by Active Record?
14. If you're using the standard Rails RESTful routes - then which of the following actions map to the url - '/posts'?
15. Ruby supports single inheritance - multiple inheritance - or both?
16. Which of the following will return false?
17. If you create PostsController - where will Rails look for its templates by default?
18. What is the output of following? 1==(0||1)
19. What is the ActionView form helper tag for
20. What is the most elegant way to include a javascript file needed for only one page?
21. Which of these is NOT a default subdirectory of the app/ directory?
22. What does Model.reset_column_information do?
23. Which is NOT a reserved Ruby logic flow word?
24. In The Author Model - how do you create a nested association between Authors and Blogs?
25. Which of the following are NOT Ruby keywords? 1) alias 2) yield 3) defined? 4) include?