Module: ControllerExtensions

Extended by:
ActiveSupport::Concern
Included in:
GithubOnRails::ApplicationController
Defined in:
lib/controller_extensions.rb

Instance Method Summary collapse

Instance Method Details

#current_userObject



10
11
12
# File 'lib/controller_extensions.rb', line 10

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