Debug Params
Render the params hash in development. Useful for debugging.
Used 45 times
S
Steve Polito
Usage
This will add <%= debug(params) if Rails.env == 'development' %> to the bottom of app/views/layouts/application.html.erb, before the closing </body> tag.
This will then render the debugged output of the params hash on every page in development.
This will then render the debugged output of the params hash on every page in development.
Run this command in your Rails app directory in the terminal:
rails app:template LOCATION="https://railsbytes.com/script/VRZsv9"
Template Source
Review the code before running this template on your machine.
inject_into_file 'app/views/layouts/application.html.erb', before: '</body>' do <<~EOF
<%= debug(params) if Rails.env == 'development' %>
EOF
end