9 lines
197 B
Ruby
9 lines
197 B
Ruby
class ApplicationController < ActionController::Base
|
|
before_action :authenticate_user
|
|
|
|
private
|
|
|
|
def authenticate_user
|
|
Current.user = User.find_by(id: session[:current_user_id])
|
|
end
|
|
end
|