You are here

view

Debug Rails View Helpers

Some common tasks in the development business are done no matter the programming language you use. Debugging is one of those tasks. While developing web applications I often need to debug the View layer and it is kind of a tedious job to write while loops to inspect variables values, for example.

Rails provides some interesting helper methods for your views:

  • debug
  • to_yaml

debug

This helper method will return the information about any object in YAML format, which is very human readable. To use this command, just type:

Subscribe to RSS - view