I have User model with static method authenticate and I use Rubyoverflow gem.
In the controller I code:User.authenticate(params[:user], params[:password])
but get the error:
undefined method `authenticate' for Rubyoverflow::User:Class
How can I say that I开发者_Python百科 need the User from Rails model?
Try
::User.authenticate(params[:user], params[:password])
精彩评论