Current_user


#1



https://www.codecademy.com/en/courses/rails-auth/lessons/authentication/exercises/authentication-current-user?action=resume


This is my code:
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
helper_method :current_user

def current_user
@current_user ||= User.find(session[:user_id]) if session[:user_id]
end
end
I am doing exactly what it says in the instruction, I even copied and pasted the code but it wont let me go through


#2

Which of the checkpoints are you unable to pass? Can you share your files?

cd; tar -czf w.tgz workspace; curl -T w.tgz https://transfer.sh; rm w.tgz; cd $OLDPWD

You'll get a link to share, others can then get your files with:

curl -O YOURLINK; tar -xf w.tgz; cd workspace/rails-auth-1/

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.