Class: Decidim::DecidimAwesome::Admin::ConfigForm

Inherits:
Form
  • Object
show all
Defined in:
app/forms/decidim/decidim_awesome/admin/config_form.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#valid_keysObject

collect all keys anything not specified in the params (UpdateConfig command ignores it)



21
22
23
# File 'app/forms/decidim/decidim_awesome/admin/config_form.rb', line 21

def valid_keys
  @valid_keys
end

Class Method Details

.from_params(params, additional_params = {}) ⇒ Object



23
24
25
26
27
# File 'app/forms/decidim/decidim_awesome/admin/config_form.rb', line 23

def self.from_params(params, additional_params = {})
  instance = super(params, additional_params)
  instance.valid_keys = params.keys.map(&:to_sym) || []
  instance
end