From fa6f19d1f83b68f2bb729be889ab7d66adbbedb8 Mon Sep 17 00:00:00 2001 From: dineshpanda Date: Fri, 30 Aug 2019 02:09:13 +0530 Subject: Remove dependency on IgnorableColumn concern --- app/models/user.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/models/user.rb') diff --git a/app/models/user.rb b/app/models/user.rb index 6107aaa7fca..79c89461806 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -13,7 +13,6 @@ class User < ApplicationRecord include Sortable include CaseSensitivity include TokenAuthenticatable - include IgnorableColumn include FeatureGate include CreatedAtFilterable include BulkMemberAccessLoad @@ -24,9 +23,11 @@ class User < ApplicationRecord DEFAULT_NOTIFICATION_LEVEL = :participating - ignore_column :external_email - ignore_column :email_provider - ignore_column :authentication_token + self.ignored_columns = %i[ + authentication_token + email_provider + external_email + ] add_authentication_token_field :incoming_email_token, token_generator: -> { SecureRandom.hex.to_i(16).to_s(36) } add_authentication_token_field :feed_token -- cgit v1.2.1 From d93b985df07ccf07541efef709edb8467e0f2955 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 29 Aug 2019 16:10:49 -0700 Subject: Use self.ignored_columns += instead of = This is to accomodate prepended modules. --- app/models/user.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/models/user.rb') diff --git a/app/models/user.rb b/app/models/user.rb index 79c89461806..cb222b87d88 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -23,11 +23,11 @@ class User < ApplicationRecord DEFAULT_NOTIFICATION_LEVEL = :participating - self.ignored_columns = %i[ - authentication_token - email_provider - external_email - ] + self.ignored_columns += %i[ + authentication_token + email_provider + external_email + ] add_authentication_token_field :incoming_email_token, token_generator: -> { SecureRandom.hex.to_i(16).to_s(36) } add_authentication_token_field :feed_token -- cgit v1.2.1