是否可以在 Rails 上创建有关使用 Pudit 或 Devise 进行用户注册的功能?

Is it possible to create a functionality about user registration with Pudit or Devise on Rails?

我已经使用 Pudit 和 Devise 通过 Web 界面进行注册和授权。

但我也想通过 REST 接口支持。是否可以使用 Pudit 或 Devise 来做到这一点。例如,发送此 JSON 用于创建新用户

{
    "email":"user@mail.com",
    "password":"password",
     "confirm_password":"password"
}

是的,这是可能的。我使用 Devise gem 创建了 RESTful api 的用户注册。 RESTful api 喜欢 - http://APPLICATION_URL/api/v1/users/sign_up.json 你可以 post json 参数如下 {"user": {"email":"user@mail.com","password":"password", "confirm_password":"password"}}

谢谢, Kapil Chothe