Sha256: a83ec4808aa29e102fe1cee2c6a8162b754cb1f8996e9842ef0a6e69f00bb394

Contents?: true

Size: 478 Bytes

Versions: 25

Compression:

Stored size: 478 Bytes

Contents

module Deface
  module Actions
    class SurroundAction < ElementAction
      def source_element
        @cloned_source_element ||= super.clone(1)
      end

      def original_placeholders
        @original_placeholders ||= source_element.css("erb:contains('render_original')")
        raise(DefaceError, "The surround action couldn't find <%= render_original %> in your template") unless @original_placeholders.first
        @original_placeholders
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
deface-1.9.0 lib/deface/actions/surround_action.rb
deface-1.8.2 lib/deface/actions/surround_action.rb
deface-1.8.1 lib/deface/actions/surround_action.rb
deface-1.8.0 lib/deface/actions/surround_action.rb
deface-1.7.0 lib/deface/actions/surround_action.rb
deface-1.6.2 lib/deface/actions/surround_action.rb
deface-1.6.1 lib/deface/actions/surround_action.rb
deface-1.6.0 lib/deface/actions/surround_action.rb
deface-1.5.3 lib/deface/actions/surround_action.rb
deface-1.5.2 lib/deface/actions/surround_action.rb
deface-1.5.1 lib/deface/actions/surround_action.rb
deface-1.5.0 lib/deface/actions/surround_action.rb
deface-1.4.0 lib/deface/actions/surround_action.rb
deface-1.3.2 lib/deface/actions/surround_action.rb
deface-1.3.1 lib/deface/actions/surround_action.rb
deface-1.3.0 lib/deface/actions/surround_action.rb
deface-1.2.0 lib/deface/actions/surround_action.rb
deface-1.1.0 lib/deface/actions/surround_action.rb
deface-1.0.2 lib/deface/actions/surround_action.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/deface-1.0.1/lib/deface/actions/surround_action.rb