Skip to content

Instantly share code, notes, and snippets.

@dacur
Created June 12, 2014 13:00
Show Gist options
  • Select an option

  • Save dacur/b801c65cb6a5850a8fa0 to your computer and use it in GitHub Desktop.

Select an option

Save dacur/b801c65cb6a5850a8fa0 to your computer and use it in GitHub Desktop.
Using logger to debug in Rails. You can include logger statements in controllers and models. The example below will inspect each status element and display all information in the console (log). This can help you determine what is going on at certain points in your application.
def index
logger.debug @statuses.inspect
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment