For some reason I’m getting undefined local variable or method current_user when trying to access it in the application.html.erb. Any idea why?
This is like minute 29 of part 1.
Here is what my application controller looks like:
class ApplicationController < ActionController::Base protect_from_forgery def sign_in_as(email) session[:current_email] = email end def current_user OpenStruct.new(email: session[:current_email]) end end