Rails: How do I print the request parameters?

Solution 1:

If you wanted to print all of the parameters, the easiest way would be to use the inspect

puts params.inspect

or better, use the Rails logger

Rails.logger.debug params.inspect

In your html/ERB, you can use

<%= params.inspect %>

Solution 2:

I would use debug(params). That will give you a nicely formatted view of them.