Sha256: f896c81316ecb36b680ee6eefa70c02a86d960774f9640e5a69fb60807ea8842

Contents?: true

Size: 689 Bytes

Versions: 38

Compression:

Stored size: 689 Bytes

Contents

module Locomotive
  module Steam
    module Liquid
      module Tags
        module Editable
          class Control < Base

            protected

            def default_element_attributes
              super.merge({
                content_from_default: self.render_default_content,
                options: @element_options[:options]
              })
            end

            def render_element(context, element)
              element.content
            end

            def render_default_content
              super.try(:strip)
            end

          end

          ::Liquid::Template.register_tag('editable_control'.freeze, Control)
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
locomotivecms_steam-1.1.0 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.1.0.rc3 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.1.0.rc2 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.1.0.rc1 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.1 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.rc10 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.rc9 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.rc8 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.rc6 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.rc4 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.rc3 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.rc2 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.rc1 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.pre.beta.3 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.pre.beta.2 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.pre.beta.1 lib/locomotive/steam/liquid/tags/editable/control.rb
locomotivecms_steam-1.0.0.pre.alpha.3 lib/locomotive/steam/liquid/tags/editable/control.rb