]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/client_application.rb
Simplify "report a problem" control
[rails.git] / app / models / client_application.rb
index e37629d1798fcbf2818be825a94d8075ed1683fb..11422e481b231c61244d46685ba174bbbc70c0f6 100644 (file)
@@ -51,7 +51,7 @@ class ClientApplication < ActiveRecord::Base
   end
 
   def access_token_for_user(user)
-    unless token = access_tokens.valid.where(:user_id => user).first
+    unless token = access_tokens.valid.find_by(:user_id => user)
       params = { :user => user }
 
       permissions.each do |p|