Sha256: 486c8f523a99c05b36dc28e08cb43c3d7305a4775d9182d3118f711077c302ac

Contents?: true

Size: 334 Bytes

Versions: 7

Compression:

Stored size: 334 Bytes

Contents

# frozen_string_literal: true

# ApplicationAssets tag
#
# == Basic usage:
#    {%application_js%}
class ApplicationJsTag < LiquidumTag
  def render(context)
    super

    js = lookup(context.registers, 'application_js')
    "<script>#{js}</script>" if js
  end
end

Liquid::Template.register_tag('application_js', ApplicationJsTag)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scribo-1.0.44 lib/scribo/liquid/tags/application_js_tag.rb
scribo-1.0.43 lib/scribo/liquid/tags/application_js_tag.rb
scribo-1.0.42 lib/scribo/liquid/tags/application_js_tag.rb
scribo-1.0.41 lib/scribo/liquid/tags/application_js_tag.rb
scribo-1.0.40 lib/scribo/liquid/tags/application_js_tag.rb
scribo-1.0.39 lib/scribo/liquid/tags/application_js_tag.rb
scribo-1.0.38 lib/scribo/liquid/tags/application_js_tag.rb