From: Andy Allan Date: Wed, 13 Nov 2019 13:19:32 +0000 (+0100) Subject: Ignore the users.nearby column X-Git-Tag: live~2356^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/dd294f89b80686fb0bd5eed6ff89cf87254440b1 Ignore the users.nearby column This is the first step of removing the column, see #2417. It needs to be deployed before a migration to remove it, since the columns are cached in ActiveRecord and things break if objects exist in memory that expect the column to be there. --- diff --git a/app/models/user.rb b/app/models/user.rb index 1095dc6ea..36ae0b55c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -46,6 +46,8 @@ class User < ActiveRecord::Base 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) }