Class: Decidim::Admin::ContentBlockForm

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

Overview

A form object used to configure a content block from the admin panel.

Direct Known Subclasses

NewsletterForm

Instance Method Summary collapse

Instance Method Details

#map_model(model) ⇒ Object



17
18
19
# File 'app/forms/decidim/admin/content_block_form.rb', line 17

def map_model(model)
  self.images = model.images_container
end

#settings?Boolean

Returns:

  • (Boolean)


21
22
23
24
25
# File 'app/forms/decidim/admin/content_block_form.rb', line 21

def settings?
  return false unless settings.respond_to?(:manifest)

  settings.manifest.attributes.any?
end