在 Byebug 中记录过滤参数
Logging Filtered parameter in Byebug
我想知道如果我在 byebug
中打印出 filtered 参数的值会发生什么。是 [FILTER]
还是 the actual value
还是 empty string
.
例如密码和信用卡字段
我得到的是空字符串,所以我不确定该值是否存在。
在控制台中:
Parameters: {"utf8"=>"✓", "email"=>"test@ff.ff", "password"=>"[FILTERED]", "commit"=>"Sing in"}
使用byebug
:
(byebug) params
{"utf8"=>"✓", "email"=>"test@ff.ff", "password"=>"11111111", "commit"=>"Sing in", "action"=>"create", "controller"=>"sessions"}
我想知道如果我在 byebug
中打印出 filtered 参数的值会发生什么。是 [FILTER]
还是 the actual value
还是 empty string
.
例如密码和信用卡字段
我得到的是空字符串,所以我不确定该值是否存在。
在控制台中:
Parameters: {"utf8"=>"✓", "email"=>"test@ff.ff", "password"=>"[FILTERED]", "commit"=>"Sing in"}
使用byebug
:
(byebug) params
{"utf8"=>"✓", "email"=>"test@ff.ff", "password"=>"11111111", "commit"=>"Sing in", "action"=>"create", "controller"=>"sessions"}