Commit dc835938

mo khan <mo@mokhan.ca>
2013-07-01 02:06:31
load the signed in user if signed in from the app controller
1 parent 97ac930
Changed files (1)
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