Class: Decidim::DecidimAwesome::Admin::AwesomeAuthorizationPropertiesForm

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

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

checks if values are empty for the organization's locale, if so, it will be considered empty and the config var will be deleted

Returns:

  • (Boolean)


15
16
17
18
19
# File 'app/forms/decidim/decidim_awesome/admin/awesome_authorization_properties_form.rb', line 15

def empty?
  locale = current_organization.default_locale.to_s

  name[locale].blank? && explanation[locale].blank?
end