Class: BlogBasic::AppController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- BlogBasic::AppController
show all
- Defined in:
- app/controllers/blog_basic/app_controller.rb
Instance Method Summary
collapse
Instance Method Details
#current_user ⇒ Object
15
16
17
18
19
20
|
# File 'app/controllers/blog_basic/app_controller.rb', line 15
def current_user
logger.info "Current user ID: " + session[:user_id].to_s
if signed_in?
session[:user_id]
end
end
|
#require_user ⇒ Object
6
7
8
|
# File 'app/controllers/blog_basic/app_controller.rb', line 6
def require_user
session[:user_id]
end
|
#signed_in? ⇒ Boolean
10
11
12
13
|
# File 'app/controllers/blog_basic/app_controller.rb', line 10
def signed_in?
logger.debug "(controller) Logged in: " + session[:user_id].to_s + " == " + BlogBasic::BlogConf.data['identity'].to_s
session[:user_id] == BlogBasic::BlogConf.data['identity']
end
|