def create
user = User.find_by_name(params[:name])
if user and user.authenticate(params[:password])
session[:user_id] = user.id
redirect_to admin_url
else
redirect_to login_url, alert: "Invalid user/password combination"
end
end
여기 왜 사용자가 인스턴스 변수 @user 대신 로컬 변수로 선언 되었습니까?@var를 인증에 사용하지 않는 이유는 무엇입니까?