]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/client_application.rb
Standardise on double quoted strings
[rails.git] / app / models / client_application.rb
index b1d3d945e2e79146a079daaf4004c53dcdf35696..84f5b978c180fd31ce246f7e5957df1ddf467724 100644 (file)
@@ -1,4 +1,4 @@
-require 'oauth'
+require "oauth"
 
 class ClientApplication < ActiveRecord::Base
   belongs_to :user
@@ -19,11 +19,7 @@ class ClientApplication < ActiveRecord::Base
 
   def self.find_token(token_key)
     token = OauthToken.find_by_token(token_key, :include => :client_application)
-    if token && token.authorized?
-      token
-    else
-      nil
-    end
+    token if token && token.authorized?
   end
 
   def self.verify_request(request, options = {}, &block)