Use self.ignored_columns += instead of =
This is to accomodate prepended modules.
This commit is contained in:
parent
fa6f19d1f8
commit
d93b985df0
|
|
@ -24,14 +24,14 @@ class ApplicationSetting < ApplicationRecord
|
||||||
serialize :domain_blacklist, Array # rubocop:disable Cop/ActiveRecordSerialize
|
serialize :domain_blacklist, Array # rubocop:disable Cop/ActiveRecordSerialize
|
||||||
serialize :repository_storages # rubocop:disable Cop/ActiveRecordSerialize
|
serialize :repository_storages # rubocop:disable Cop/ActiveRecordSerialize
|
||||||
|
|
||||||
self.ignored_columns = %i[
|
self.ignored_columns += %i[
|
||||||
clientside_sentry_dsn
|
clientside_sentry_dsn
|
||||||
clientside_sentry_enabled
|
clientside_sentry_enabled
|
||||||
koding_enabled
|
koding_enabled
|
||||||
koding_url
|
koding_url
|
||||||
sentry_dsn
|
sentry_dsn
|
||||||
sentry_enabled
|
sentry_enabled
|
||||||
]
|
]
|
||||||
|
|
||||||
cache_markdown_field :sign_in_text
|
cache_markdown_field :sign_in_text
|
||||||
cache_markdown_field :help_page_text
|
cache_markdown_field :help_page_text
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,14 @@ module Ci
|
||||||
|
|
||||||
BuildArchivedError = Class.new(StandardError)
|
BuildArchivedError = Class.new(StandardError)
|
||||||
|
|
||||||
self.ignored_columns = %i[
|
self.ignored_columns += %i[
|
||||||
artifacts_file
|
artifacts_file
|
||||||
artifacts_file_store
|
artifacts_file_store
|
||||||
artifacts_metadata
|
artifacts_metadata
|
||||||
artifacts_metadata_store
|
artifacts_metadata_store
|
||||||
artifacts_size
|
artifacts_size
|
||||||
commands
|
commands
|
||||||
]
|
]
|
||||||
|
|
||||||
belongs_to :project, inverse_of: :builds
|
belongs_to :project, inverse_of: :builds
|
||||||
belongs_to :runner
|
belongs_to :runner
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class DeployKey < Key
|
||||||
scope :are_public, -> { where(public: true) }
|
scope :are_public, -> { where(public: true) }
|
||||||
scope :with_projects, -> { includes(deploy_keys_projects: { project: [:route, :namespace] }) }
|
scope :with_projects, -> { includes(deploy_keys_projects: { project: [:route, :namespace] }) }
|
||||||
|
|
||||||
self.ignored_columns = %i[can_push]
|
self.ignored_columns += %i[can_push]
|
||||||
|
|
||||||
accepts_nested_attributes_for :deploy_keys_projects
|
accepts_nested_attributes_for :deploy_keys_projects
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ class Note < ApplicationRecord
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self.ignored_columns = %i[original_discussion_id]
|
self.ignored_columns += %i[original_discussion_id]
|
||||||
|
|
||||||
cache_markdown_field :note, pipeline: :note, issuable_state_filter_enabled: true
|
cache_markdown_field :note, pipeline: :note, issuable_state_filter_enabled: true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class NotificationSetting < ApplicationRecord
|
class NotificationSetting < ApplicationRecord
|
||||||
|
self.ignored_columns += %i[events]
|
||||||
self.ignored_columns = %i[events]
|
|
||||||
|
|
||||||
enum level: { global: 3, watch: 2, participating: 1, mention: 4, disabled: 0, custom: 5 }
|
enum level: { global: 3, watch: 2, participating: 1, mention: 4, disabled: 0, custom: 5 }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,11 @@ class User < ApplicationRecord
|
||||||
|
|
||||||
DEFAULT_NOTIFICATION_LEVEL = :participating
|
DEFAULT_NOTIFICATION_LEVEL = :participating
|
||||||
|
|
||||||
self.ignored_columns = %i[
|
self.ignored_columns += %i[
|
||||||
authentication_token
|
authentication_token
|
||||||
email_provider
|
email_provider
|
||||||
external_email
|
external_email
|
||||||
]
|
]
|
||||||
|
|
||||||
add_authentication_token_field :incoming_email_token, token_generator: -> { SecureRandom.hex.to_i(16).to_s(36) }
|
add_authentication_token_field :incoming_email_token, token_generator: -> { SecureRandom.hex.to_i(16).to_s(36) }
|
||||||
add_authentication_token_field :feed_token
|
add_authentication_token_field :feed_token
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ places. This can be done by defining the columns to ignore. For example, to igno
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
class User < ApplicationRecord
|
class User < ApplicationRecord
|
||||||
self.ignored_columns = %i[updated_at]
|
self.ignored_columns += %i[updated_at]
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue