summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
blob: 693bd8666d34d8cdfce94915eadeeafde2455b06 (plain)
1
2
3
4
5
6
7
8
9
10
class ApplicationController < ActionController::Base
  protect_from_forgery

  helper_method :current_user

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