Guest User

Untitled

a guest
Nov 20th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. class ApplicationController < ActionController::Base
  2. protect_from_forgery
  3. helper_method :current_user
  4.  
  5. private
  6. def current_user
  7. @current_user ||= User.find(session[:user_id]) if session[:user_id]
  8. end
  9. end
Add Comment
Please, Sign In to add comment