diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index e15cb30f550..2e4801a552f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1431,17 +1431,6 @@ Rails/I18nLocaleTexts: - 'lib/tasks/mastodon.rake' - 'spec/helpers/flashes_helper_spec.rb' -# This cop supports unsafe autocorrection (--autocorrect-all). -Rails/IgnoredColumnsAssignment: - Exclude: - - 'app/models/account.rb' - - 'app/models/account_stat.rb' - - 'app/models/admin/action_log.rb' - - 'app/models/custom_filter.rb' - - 'app/models/email_domain_block.rb' - - 'app/models/report.rb' - - 'app/models/status_edit.rb' - # Configuration parameters: IgnoreScopes, Include. # Include: app/models/**/*.rb Rails/InverseOf: diff --git a/app/models/account.rb b/app/models/account.rb index c4df4887894..f49cae901ce 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -53,7 +53,7 @@ # class Account < ApplicationRecord - self.ignored_columns = %w( + self.ignored_columns += %w( subscription_expires_at secret remote_url diff --git a/app/models/account_stat.rb b/app/models/account_stat.rb index 834f8ba4c20..0fea7732e98 100644 --- a/app/models/account_stat.rb +++ b/app/models/account_stat.rb @@ -16,7 +16,7 @@ class AccountStat < ApplicationRecord self.locking_column = nil - self.ignored_columns = %w(lock_version) + self.ignored_columns += %w(lock_version) belongs_to :account, inverse_of: :account_stat diff --git a/app/models/admin/action_log.rb b/app/models/admin/action_log.rb index 4fa8008f5c0..f2c121d7580 100644 --- a/app/models/admin/action_log.rb +++ b/app/models/admin/action_log.rb @@ -17,7 +17,7 @@ # class Admin::ActionLog < ApplicationRecord - self.ignored_columns = %w( + self.ignored_columns += %w( recorded_changes ) diff --git a/app/models/custom_filter.rb b/app/models/custom_filter.rb index d85e196e964..0f4fd78cbff 100644 --- a/app/models/custom_filter.rb +++ b/app/models/custom_filter.rb @@ -15,7 +15,7 @@ # class CustomFilter < ApplicationRecord - self.ignored_columns = %w(whole_word irreversible) + self.ignored_columns += %w(whole_word irreversible) alias_attribute :title, :phrase alias_attribute :filter_action, :action diff --git a/app/models/email_domain_block.rb b/app/models/email_domain_block.rb index 276e7d31a1f..3c9be51cab0 100644 --- a/app/models/email_domain_block.rb +++ b/app/models/email_domain_block.rb @@ -12,7 +12,7 @@ # class EmailDomainBlock < ApplicationRecord - self.ignored_columns = %w( + self.ignored_columns += %w( ips last_refresh_at ) diff --git a/app/models/report.rb b/app/models/report.rb index a9940459de5..c3a0c4c8b21 100644 --- a/app/models/report.rb +++ b/app/models/report.rb @@ -21,7 +21,7 @@ # class Report < ApplicationRecord - self.ignored_columns = %w(action_taken) + self.ignored_columns += %w(action_taken) include Paginable include RateLimitable diff --git a/app/models/status_edit.rb b/app/models/status_edit.rb index 683441bb56f..2b3248bb2cc 100644 --- a/app/models/status_edit.rb +++ b/app/models/status_edit.rb @@ -20,7 +20,7 @@ class StatusEdit < ApplicationRecord include RateLimitable - self.ignored_columns = %w( + self.ignored_columns += %w( media_attachments_changed )