Sha256: 83fc803b11e868ebd7d0209fe1f1277da7f083dd8b39d8b46b47f9cea9be663c

Contents?: true

Size: 675 Bytes

Versions: 44

Compression:

Stored size: 675 Bytes

Contents

module Locomotive
  module Wagon

    class EditableElementDecorator < Locomotive::Steam::Decorators::TemplateDecorator

      include ToHashConcern
      include PersistAssetsConcern

      attr_accessor :__content_assets_pusher__

      def initialize(object, locale = nil, content_assets_pusher)
        self.__content_assets_pusher__ = content_assets_pusher
        super(object, locale, nil)
      end

      def __attributes__
        %i(block slug content)
      end

      def content
        case value = super
        when %r(^/samples/)
          asset_io(value)
        else
          replace_with_content_assets!(value)
        end
      end

    end

  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
locomotivecms_wagon-3.2.0.alpha2 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.2.0.alpha1 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.1.1 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.1.0 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.1.0.beta1 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.0.5 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.0.4 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.0.3 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.0.2 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.0.0 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.0.0.rc0 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-3.0.0.beta2 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-2.4.1 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-2.4.0 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-2.4.0.rc2 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-2.4.0.rc1 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-2.3.0 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-2.3.0.rc1 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-2.2.0 lib/locomotive/wagon/decorators/editable_element_decorator.rb
locomotivecms_wagon-2.2.0.rc3 lib/locomotive/wagon/decorators/editable_element_decorator.rb