Sha256: d25f00c3184bebc1ee65a68ce5897fa68d7d6b48e3b775aff0970aad76c4c1f6

Contents?: true

Size: 468 Bytes

Versions: 47

Compression:

Stored size: 468 Bytes

Contents

module Locomotive
  module Steam

    class EditableElementService

      include Locomotive::Steam::Services::Concerns::Decorator

      attr_accessor_initialize :repository, :locale

      def find(page, block, slug)
        decorate(Decorators::I18nDecorator) do
          repository.editable_element_for(page, block, slug).tap do |element|
            element.base_url = repository.base_url(page) if element
          end
        end
      end

    end

  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
locomotivecms_steam-1.0.0.rc9 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.rc8 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.rc6 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.rc4 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.rc3 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.rc2 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.rc1 lib/locomotive/steam/services/editable_element_service.rb