Sha256: 88073cc32ec0543f8e74fb7a3559fab786ff72c2f69c9c233832e79477d1b7a6

Contents?: true

Size: 450 Bytes

Versions: 5

Compression:

Stored size: 450 Bytes

Contents

module Locomotive
  module Steam

    class EditableElementService < Struct.new(:repository, :locale)

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

      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

5 entries across 5 versions & 1 rubygems

Version Path
locomotivecms_steam-1.0.0.pre.beta.3 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.pre.beta.2 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.pre.beta.1 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.pre.alpha.3 lib/locomotive/steam/services/editable_element_service.rb
locomotivecms_steam-1.0.0.pre.alpha.2 lib/locomotive/steam/services/editable_element_service.rb