Class: Decidim::System::UpdateOrganizationForm

Inherits:
Form
  • Object
show all
Includes:
TranslatableAttributes
Defined in:
app/forms/decidim/system/update_organization_form.rb

Overview

A form object used to update organizations from the system dashboard.

Direct Known Subclasses

RegisterOrganizationForm

Instance Method Summary collapse

Instance Method Details

#clean_available_authorizationsObject



32
33
34
35
# File 'app/forms/decidim/system/update_organization_form.rb', line 32

def clean_available_authorizations
  return unless available_authorizations
  available_authorizations.select(&:present?)
end

#clean_secondary_hostsObject



27
28
29
30
# File 'app/forms/decidim/system/update_organization_form.rb', line 27

def clean_secondary_hosts
  return unless secondary_hosts
  secondary_hosts.split("\n").map(&:chomp).select(&:present?)
end

#map_model(model) ⇒ Object



23
24
25
# File 'app/forms/decidim/system/update_organization_form.rb', line 23

def map_model(model)
  self.secondary_hosts = model.secondary_hosts.join("\n")
end