X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8a39c6b4a223160d47b293bc07d57d4e77685746..07feac3cd93d28cf3db4cc847b8289657db37094:/app/models/user.rb?ds=sidebyside 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 ##