Sha256: 434a8171601235d0b1086f210397bb22e421de061f5eec92d9a11e0005feb1eb

Contents?: true

Size: 228 Bytes

Versions: 52

Compression:

Stored size: 228 Bytes

Contents

module Scrivito
  class ContentWidget < ::Widget
    attribute :content, :reference

    hide_from_editor

    def description_for_editor
      content.try(:description_for_editor).presence || 'Content Widget'
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
scrivito_sdk-0.70.0.rc2 app/models/scrivito/content_widget.rb
scrivito_sdk-0.70.0.rc1 app/models/scrivito/content_widget.rb
scrivito_sdk-0.66.0 app/models/scrivito/content_widget.rb
scrivito_sdk-0.66.0.rc2 app/models/scrivito/content_widget.rb
scrivito_sdk-0.65.2 app/models/scrivito/content_widget.rb
scrivito_sdk-0.66.0.rc1 app/models/scrivito/content_widget.rb
scrivito_sdk-0.65.1 app/models/scrivito/content_widget.rb
scrivito_sdk-0.65.0 app/models/scrivito/content_widget.rb
scrivito_sdk-0.65.0.rc2 app/models/scrivito/content_widget.rb
scrivito_sdk-0.65.0.rc1 app/models/scrivito/content_widget.rb
scrivito_sdk-0.60.0 app/models/scrivito/content_widget.rb
scrivito_sdk-0.60.0.rc2 app/models/scrivito/content_widget.rb