Home > Ruby On Rails Programming > 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. Determine the value of the variable x after the execution of the following code. x = [1 - 2 - 3] x.pop until x.empty? x.push(4) while x.empty?
2. Which is NOT a reserved Ruby logic flow word?
3. What is the command to install Rails?
4. For your app to route the 'http://myapp.com/' to the home controller - index action; what could you add to your routes.rb file?
5. What command do you run to update your database?
6. Ruby uses:
7. If a method is protected:
8. In the MVC pattern:
9. Which of the following will interpolate within a string with the variable named 'monster'?
10. How does the Asset Pipeline (Rails 3.1 +) deal with different precompiled versions of an asset?
11. Which of the following prints the 'Hello WORLD!' output with a new line?
12. An instance variable has a name beginning with___________.
13. What should be the standard table name for has_and_belongs_to_many relationship between teams and users?
14. If you create PostsController - where will Rails look for its templates by default?
15. Which of the following will delete the key-value 1 from array: 'big_data'?
16. The session is - by default - accessible to:
17. Unit tests are used to test what part of a Rails application?
18. If you want to display the price of an item - with a :time_span tag - where would you place this code?
19. which one is class method?
20. REST stands for...
21. How can you create a new Rails project?
22. If you want the /person url to map to your dog controller and show method - what do you add to your routes?
23. Of the following - which would create a new project without unit test?
24. Imagine that you have two models: 'User' and 'Book' - and a user can have only one book. How should the association look like in the 'User' model?
25. Which does NOT append 'nine' to the array: 'big_data'?

⚡ Recently practiced quizzes in this topic
Live quiz activity