Debugging in Rails
View Helpers
debug
<%= debug @article %>
<%# The same as %>
<%= simple_format @article.to_yaml %>
Outputs the object as formatted YAML.
inspect
Like .to_s but with better output.
Debugger
In The ruby code, write debugger. The debugger will then open in the console.