Class: Sinatra::AssetPack::Package
- Inherits:
-
Object
- Object
- Sinatra::AssetPack::Package
- Defined in:
- lib/assetpack_patch.rb
Instance Method Summary collapse
Instance Method Details
#production_path ⇒ Object
3 4 5 6 7 |
# File 'lib/assetpack_patch.rb', line 3 def production_path app_root = Padrino.mounted_apps.find{ |app| app.name == @assets.app.name }.uri_root asset_path = add_cache_buster( @path, *files ) app_root == '/' ? asset_path : ( app_root + asset_path ) end |
#to_development_html(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/assetpack_patch.rb', line 9 def to_development_html(={}) app_root = Padrino.mounted_apps.find{ |app| app.name == @assets.app.name }.uri_root path_prefix = app_root == '/' ? '' : app_root paths_and_files.map { |path, file| path = add_cache_buster(path_prefix + path, file) # app.css => app.829378.css link_tag(path, ) }.join("\n") end |