Commit 479872b6

mo khan <mo@mokhan.ca>
2013-07-02 02:42:36
check if current_user is available
1 parent 208d3d5
Changed files (1)
app
app/models/avatar.rb
@@ -1,6 +1,6 @@
 class Avatar < ActiveRecord::Base
   include PublicActivity::Model
-  tracked owner: Proc.new{ |controller, model| controller.current_user }
+  tracked owner: Proc.new{ |controller, model| controller.current_user if controller }
   belongs_to :user
   mount_uploader :avatar, AvatarUploader