I'm trying to implement simple authorization following by certain tutorial.
class AuthController < ApplicationController
layout 'public'
def auth_user
user = User.authenticate(login_params)
if user
session[:user_id] = user.id
redirect_to(:action => 'home')
else
flash[:notice] = "wrong username or password"
flash[:color]= "invalid"
render "login"
end
end
private
def login_params
params.require(:login_data, :password)
end
end
and getting the exception at params.require saying 'wrong number of arguments (2 for 1)'. can't understand, what am I doing wrong? rails 4.1.1