Skip to content

Commit

Permalink
Removes memoization that doesn't seem to actually work and unnecessar…
Browse files Browse the repository at this point in the history
…y if statement
  • Loading branch information
jmaddox19 authored May 15, 2020
1 parent 2ebc7f0 commit 23cddc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 09-intermediate-rails/controller-filters-contd.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ In the `app/controllers/application_controller.rb`:
before_action :require_login

def current_user
@current_user ||= User.find(session[:user_id]) if session[:user_id]
@current_user = User.find(session[:user_id])
end

def require_login
Expand Down

0 comments on commit 23cddc1

Please sign in to comment.