Skip to content

Instantly share code, notes, and snippets.

@cliftonlabrum
Last active October 12, 2015 14:27
Show Gist options
  • Save cliftonlabrum/4040290 to your computer and use it in GitHub Desktop.
Save cliftonlabrum/4040290 to your computer and use it in GitHub Desktop.
Different ways to show debug info in Rails
In the controller:
render :text => @some_object.inspect
(your view won't be rendered)
In the view:
<%= debug(@some_object) %>
You could also:
logger.info "My info message"
logger.debug "My debugging message"
logger.warn "My warning message"
...and run tail on log/development.log to see the output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment