# users_home_idx (home_tile)
#
-class User < ActiveRecord::Base
+class User < ApplicationRecord
require "xml/libxml"
- self.ignored_columns = %w[image_file_name image_fingerprint image_content_type]
-
has_many :traces, -> { where(:visible => true) }
has_many :diary_entries, -> { order(:created_at => :desc) }
has_many :diary_comments, -> { order(:created_at => :desc) }
end
def is_friends_with?(new_friend)
- friendships.where(:befriendee => new_friend).exists?
+ friendships.exists?(:befriendee => new_friend)
end
##