I have a Rails 3 application and I want to print in the view the request parameters. How do I do it?
Edit:
The purpose is to see what is being sent in a Form
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 %>
pretty_print
also can be useful, in ruby and rails apps both
pp params
pretty_print doc: http://ruby-doc.org/stdlib-2.1.0/libdoc/pp/rdoc/PP.html