diff options
| author | mo khan <mo@mokhan.ca> | 2013-06-30 19:06:31 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-06-30 19:06:31 -0700 |
| commit | dc835938ad352192261de386646e373d80d40435 (patch) | |
| tree | ffa030430811130ec029443044597ec0dd1c0dfe /app/controllers/application_controller.rb | |
| parent | 97ac9301339abbb2f81ea489954c7de1f566017d (diff) | |
load the signed in user if signed in from the app controller
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 471187b5..3fe629bc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,6 +2,7 @@ class ApplicationController < ActionController::Base protect_from_forgery before_filter :profile_application before_filter :load_categories + before_filter :load_user private @@ -18,4 +19,8 @@ class ApplicationController < ActionController::Base Category.all end end + + def load_user + @user = current_user if current_user + end end |
