API signin to generate token using devise in rails 4
问题 I am implementing api via rails. I want to implement following feature but unable to figure out how? I tried this sample app I have user model with email, password and access_token class UsersController < ApplicationController def signin c_user = User.find_by_email(params[:email]) pass = params[:password] if c_user.password == pass render json: c_user.access_token end end private def users_params params.require(:user).permit(:email, :password) end end If user request via api for http:/