module Webpacked::Helper
Add new view helpers
Public Instance Methods
asset_tag(entry, kind)
click to toggle source
Return include tags for entry point by given asset kind. No extra common file included even if it exists
# File lib/webpacked/helper.rb, line 30 def asset_tag(entry, kind) path = webpacked_asset_path(entry, kind) if path case kind when :js then javascript_include_tag path when :css then stylesheet_link_tag path end end end
webpacked_asset_path(entry, kind = nil)
click to toggle source
Alias for Webpacked::Manifest.asset_paths
# File lib/webpacked/helper.rb, line 41 def webpacked_asset_path(entry, kind = nil) Webpacked::Manifest.asset_paths(entry, kind) end