Sha256: f95443ba27dd92c7e796bffae14f626058b07944c773ff58530abe96cb68d2cf
Contents?: true
Size: 646 Bytes
Versions: 2
Compression:
Stored size: 646 Bytes
Contents
module Sinatra module Bundles # View helpers module Helpers # Emit a script tag for a javascript bundle # # @param [Symbol,String] bundle The bundle name # @return [String] HTML script tag def javascript_bundle_include_tag(bundle) settings.javascript_bundles[bundle].to_html(bundle) end # Emit a script tag for a stylesheet bundle # # @param [Symbol,String] bundle The bundle name # @return [String] HTML link tag def stylesheet_bundle_link_tag(bundle, media = :all) settings.stylesheet_bundles[bundle].to_html(bundle, media) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sinatra-bundles-0.4.0 | lib/sinatra/bundles/helpers.rb |
sinatra-bundles-0.3.0 | lib/sinatra/bundles/helpers.rb |