Sha256: f4589918956c9a4a60c75dc19f3c877020f76794fc1c5e27190f2dd87c4f564c

Contents?: true

Size: 322 Bytes

Versions: 2

Compression:

Stored size: 322 Bytes

Contents

class AccordionWidget < Widget
  attribute :panels, :widgetlist, default: [
    AccordionPanelWidget.new(title: 'First Panel'),
    AccordionPanelWidget.new(title: 'Second Panel')
  ]

  def valid_widget_classes_for(field_name)
    [AccordionPanelWidget]
  end

  def self.description_for_editor
    'Accordion'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scrivito_accordion_widget-1.0.10 app/models/accordion_widget.rb
scrivito_accordion_widget-1.0.9 app/models/accordion_widget.rb