Rails: How do I print the request parameters?

后端 未结 8 1629
挽巷
挽巷 2020-12-13 06:11

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

8条回答
  •  天涯浪人
    2020-12-13 06:30

    Something like

    <%= params.inspect %>
    

    works, but what I would like to add is the following gem and Chrome plugin which was literally an eye-opener.

    I am putting it here because I think it will help people check out params hashes, see SQL queries or view Errors.

提交回复
热议问题