Module: Decidim::Toggle::ModuleConfigForm
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/decidim/toggle/module_config_form.rb
Overview
Include in a Form used with add_tab ..., module_name: so from_model(organization)
loads JSON from OrganizationModuleConfig and UpdateModuleConfigCommand can persist it.
Field labels resolve from decidim_toggle.system.<module_config_name> (see integrate/labels.md).
class MyModule::AdminConfigForm < Decidim::Form
include Decidim::Toggle::ModuleConfigForm
self.module_config_name = "decidim_geo"
mimic :organization
attribute :enabled, :boolean
end