Convert @user to current_user
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 27 Jul 2017 09:31:31 +0000 (10:31 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Thu, 27 Jul 2017 09:31:31 +0000 (10:31 +0100)
app/controllers/application_controller.rb

index 049f6e02ea79207556505e5e104105ecc3809104..a367a1b0a756ed257ea68905d98af50e6b4fe6a6 100644 (file)
@@ -49,7 +49,7 @@ class ApplicationController < ActionController::Base
   end
 
   def require_oauth
-    @oauth = @user.access_token(OAUTH_KEY) if current_user && defined? OAUTH_KEY
+    @oauth = current_user.access_token(OAUTH_KEY) if current_user && defined? OAUTH_KEY
   end
 
   ##