X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a7092491b069de43bb8d8c30d3526e7095c5cc98..07feac3cd93d28cf3db4cc847b8289657db37094:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index 1095dc6ea..92fb3287b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 ##