Sha256: 5b64a52ab6234d9904dad69aeb52c23d590da004666e7b276dff11048378ea3f
Contents?: true
Size: 523 Bytes
Versions: 2
Compression:
Stored size: 523 Bytes
Contents
module Lines class ApplicationController < ActionController::Base private # sets the current_lines_user if one exists in session def current_lines_user @current_lines_user ||= Lines::User.find(session[:user_id]) if session[:user_id] end helper_method :current_lines_user # checks if current user is authorized. Redirects to login_url if not def authorize redirect_to login_url, notice: t('lines.please_login') if current_lines_user.nil? end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jeygeethanmedia-inkpen-1.2.6.2 | app/controllers/lines/application_controller.rb |
jeygeethanmedia-inkpen-1.2.6.1 | app/controllers/lines/application_controller.rb |