i have a simple controller where i want to log user manually and for some reason devise method sign_in is not working
Here is my controller:
class Brand::ChallengesController < ApplicationController
def sign_in
user = User.find_by_email(params[:email])
if user and user.valid_password?(params[:password])
sign_in(:user, user)
redirect_to brand_challenges_url
else
...
end
end
...
edit : I always get this answer on the sign_in method:
wrong number of arguments (2 for 0)
It seems that i only can use this method within a devise child class. I tried to include many Devise helpers but nothing it working for the moment.