summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-06-30 19:06:31 -0700
committermo khan <mo@mokhan.ca>2013-06-30 19:06:31 -0700
commitdc835938ad352192261de386646e373d80d40435 (patch)
treeffa030430811130ec029443044597ec0dd1c0dfe /app/controllers/application_controller.rb
parent97ac9301339abbb2f81ea489954c7de1f566017d (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.rb5
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