]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Merge remote-tracking branch 'upstream/pull/2773'
[rails.git] / app / models / user.rb
index 1095dc6eaccbf9e4466d4b80bc6764d81f76371b..92fb3287b59e8c88e6a7783caa461c28354c8b35 100644 (file)
@@ -43,7 +43,7 @@
 #  users_home_idx                (home_tile)
 #
 
-class User < ActiveRecord::Base
+class User < ApplicationRecord
   require "xml/libxml"
 
   has_many :traces, -> { where(:visible => true) }
@@ -218,7 +218,7 @@ class User < ActiveRecord::Base
   end
 
   def is_friends_with?(new_friend)
-    friendships.where(:befriendee => new_friend).exists?
+    friendships.exists?(:befriendee => new_friend)
   end
 
   ##