]> 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 36ae0b55c9bf005274d8866231f50672a55dd1d8..92fb3287b59e8c88e6a7783caa461c28354c8b35 100644 (file)
 #  users_home_idx                (home_tile)
 #
 
-class User < ActiveRecord::Base
+class User < ApplicationRecord
   require "xml/libxml"
 
-  self.ignored_columns = ["nearby"]
-
   has_many :traces, -> { where(:visible => true) }
   has_many :diary_entries, -> { order(:created_at => :desc) }
   has_many :diary_comments, -> { order(:created_at => :desc) }
@@ -220,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
 
   ##