Autofix Rubocop Rails/IgnoredColumnsAssignment (#23761)

This commit is contained in:
Nick Schonning 2023-03-31 09:07:22 -04:00 committed by GitHub
parent 7646ad8a2b
commit cb2ce842b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 18 deletions

View File

@ -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:

View File

@ -53,7 +53,7 @@
#
class Account < ApplicationRecord
self.ignored_columns = %w(
self.ignored_columns += %w(
subscription_expires_at
secret
remote_url

View File

@ -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

View File

@ -17,7 +17,7 @@
#
class Admin::ActionLog < ApplicationRecord
self.ignored_columns = %w(
self.ignored_columns += %w(
recorded_changes
)

View File

@ -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

View File

@ -12,7 +12,7 @@
#
class EmailDomainBlock < ApplicationRecord
self.ignored_columns = %w(
self.ignored_columns += %w(
ips
last_refresh_at
)

View File

@ -21,7 +21,7 @@
#
class Report < ApplicationRecord
self.ignored_columns = %w(action_taken)
self.ignored_columns += %w(action_taken)
include Paginable
include RateLimitable

View File

@ -20,7 +20,7 @@
class StatusEdit < ApplicationRecord
include RateLimitable
self.ignored_columns = %w(
self.ignored_columns += %w(
media_attachments_changed
)