ruby on rails - can't include devise helper methods in my controller -
i'm working on api , have login via devise. working on controllers, have method in sessionscontroller
this
def create resource = user.find_for_database_authentication(email: params[:user_email]) return invalid_login_attempt unless resource if resource.valid_password?(params[:user_password]) session[:uid] = resource.authentication_token #sign_in("user", resource) render :json => {success: true, auth_token: resource.authentication_token, email: resource.email} return end invalid_login_attempt end
but got error on sign_in
saying method doesn't exists.
tried include devise::controllers::internalhelpers
doesn't worked too...
missing?
Comments
Post a Comment