Search code examples
ruby-on-railsrubydevisepundit

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


I already used Pudit and Devise for registration and authorization via the web interface.

But I want to support via REST interface too. Is it possible to use Pudit or Devise for doing that. For example, sending this JSON for creating a new user

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

Solution

  • Yes It is possible. I have used Devise gem to create user registration with RESTful api. RESTful api like - http://APPLICATION_URL/api/v1/users/sign_up.json and You can post json parameter as follows {"user": {"email":"user@mail.com","password":"password", "confirm_password":"password"} }

    Thanks, Kapil Chothe