O'Reilly logo

Learning Rails: Live Edition by Edd Dumbill, Simon St. Laurent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Test Your Knowledge

Quiz

  1. What’s the easiest way to present debugging information in a Rails view?

  2. Where can you find information about how quickly different aspects of a request were handled?

  3. How can you test routing from the console?

  4. How do you tell your program to support the Ruby debugger?

  5. How do you let your program continue when you exit the Ruby debugger?

Answers

  1. The debug method makes it easy to present the complete contents of an object in a mostly readable YAML representation..

  2. Rails includes a lot of timing information in its development log, which is available both in the terminal window for script/server and in the log/development.log file.

  3. You can test simple routes by calling app.url_for. If you need to test named routes, include ActionController:UrlWriter and then try calling the path methods.

  4. By adding require "ruby-debug" to the config/environments/development.rb file.

  5. When you use the cont command, rather than the quit command, the debugger lets Rails get back to what it was doing. The quit command exits the debugger and shuts down the application.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required