Project

General

Profile

« Previous | Next » 

Revision 6340ec56

Added by Evgeni Golov 10 months ago

Fixes #36660 - drop value from settings dsl

also update plugin docs to use a seed instead of a migration if they
need a value

View differences:

app/services/setting_registry.rb
@values_loaded_at = Time.zone.now if settings.any?
end
def _add(name, category:, type:, default:, description:, full_name:, context:, value: nil, encrypted: false, collection: nil, options: {})
def _add(name, category:, type:, default:, description:, full_name:, context:, encrypted: false, collection: nil, options: {})
select_collection_registry.add(name, collection: collection, **options) if collection
Foreman::Deprecation.deprecation_warning('3.3', "initial value of setting '#{name}' should be created in a migration") if value
@settings[name.to_s] = SettingPresenter.new({ name: name,
context: context,
......
settings_type: type.to_s,
description: description,
default: default,
value: value,
full_name: full_name,
collection: collection,
encrypted: encrypted })

Also available in: Unified diff