开发者

Possible to dump the contents of the session onto the screen?

开发者 https://www.devze.com 2023-03-17 05:14 出处:网络
Is it possible to dump the contents of session or what is in the params onto开发者_Go百科 the page for debugging information?If so, how do you do it?

Is it possible to dump the contents of session or what is in the params onto开发者_Go百科 the page for debugging information? If so, how do you do it?

Thanks


You can use the debug method in your views to pretty print the value.

<%= debug params %>
<%= debug session %>

http://api.rubyonrails.org/classes/ActionView/Helpers/DebugHelper.html


Use this to see the session

logger.info session.inspect

You should be able to see the parameters in the server log by default...

0

精彩评论

暂无评论...
验证码 换一张
取 消