Rails:如何打印请求参数? [英] Rails: How do I print the request parameters?
本文介绍了Rails:如何打印请求参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 Rails 3 应用程序,我想在视图中打印请求参数.我该怎么做?
I have a Rails 3 application and I want to print in the view the request parameters. How do I do it?
目的是查看表单中发送的内容.
The purpose is to see what is being sent in a Form.
推荐答案
我会使用 debug(params)
.这将为您提供格式良好的视图.
I would use debug(params)
. That will give you a nicely formatted view of them.
这篇关于Rails:如何打印请求参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文