【发布时间】:2012-04-23 07:26:08
【问题描述】:
我们通过 POST 接收格式为 {email,password,hash,currentDate,companyName} 的 json-object
需要使用 RoR 方法在我们的数据库(postrege)中创建用户。
请帮助实现该方法。
【问题讨论】:
-
粘贴您通过 POST 方法接收到的确切 JSON 数据。
-
{email:'example@example.com',password:'passexp',hash:'abc',currentDate:'23.04.2012',companyName:'Test_company'}
-
控制器中params的值是多少?将 params.inspect 放入您的控制器操作名称并粘贴输出。
-
我是 RoR 的新手。我现在没有控制器。只需要了解它是如何工作的。
-
无论如何,感谢您的时间和帮助。
标签: ruby-on-rails database json post