* Rename SiteConfig * More renaming * Update spec * Update mandatory settings mapping * More renaming * e2e test fixes * You have a rename, and you have a rename * Spec fix * More changes * Temporarily disable specs * After-merge update * Undo rename for migration * undo rename of DUS * Fix DUS * Fix merge problem * Remove redundant DUS * Fix specs * Remove unused code * Change wrong class name * More cleanup * Re-add missing values to constant * Fix constant * Fix spec * Remove obsolete fields * Add accidentally removed field * Update spec * Move methods from Settings::General to ForemInstance * Remove unneeded model * Change mentions of 'site config'
28 lines
674 B
Ruby
28 lines
674 B
Ruby
module Settings
|
|
# We use this model to back the "Get Started" form of the config admin page.
|
|
class Mandatory
|
|
include ActiveModel::Naming
|
|
|
|
MAPPINGS = {
|
|
community_name: Settings::Community,
|
|
community_description: Settings::Community,
|
|
|
|
suggested_tags: Settings::General,
|
|
suggested_users: Settings::General
|
|
}.freeze
|
|
|
|
MAPPINGS.each do |setting, settings_model|
|
|
delegate setting, "#{setting}=", to: settings_model
|
|
end
|
|
|
|
def self.keys
|
|
MAPPINGS.keys
|
|
end
|
|
|
|
def self.missing
|
|
MAPPINGS.reject do |settings, settings_model|
|
|
settings_model.public_send(settings).present?
|
|
end.keys
|
|
end
|
|
end
|
|
end
|