在 Rails ActiveResource 中显示 POST 参数



我正在使用ActiveResource从外部API获取和发布资源。 尽管在日志中我可以看到正在执行的调用,但我看不到参数。默认情况下不应该打印参数哈希吗?

我应该如何/添加什么才能看到它们?

ActiveResource Post 调用语法为:

post(your_custom_method_name, options={}, body='')

此处选项是查询参数

前任:

Customer.post(:bulk_import, {}, { new_customers: new_customers}.to_json)

最新更新