adamh-asset_library 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/asset_library/helpers.rb +4 -2
- metadata +1 -1
@@ -3,7 +3,8 @@ class AssetLibrary
|
|
3
3
|
def asset_library_javascript_tags(module_key)
|
4
4
|
m = AssetLibrary.asset_module(module_key)
|
5
5
|
if AssetLibrary.cache
|
6
|
-
|
6
|
+
@@asset_library_javascript_tags_cache ||= {}
|
7
|
+
@@asset_library_javascript_tags_cache[module_key] ||= script_tag(m.cache_asset.relative_url)
|
7
8
|
else
|
8
9
|
m.assets.collect{|a| script_tag(a.relative_url)}.join("\n")
|
9
10
|
end
|
@@ -12,7 +13,8 @@ class AssetLibrary
|
|
12
13
|
def asset_library_stylesheet_tags(module_key, extra_suffix = nil)
|
13
14
|
m = AssetLibrary.asset_module(module_key)
|
14
15
|
if AssetLibrary.cache
|
15
|
-
|
16
|
+
@@asset_library_stylesheet_tags_cache ||= {}
|
17
|
+
@@asset_library_stylesheet_tags_cache[[module_key, extra_suffix]] ||= style_tag(m.cache_asset(extra_suffix).relative_url)
|
16
18
|
else
|
17
19
|
import_styles_tag(m.assets(extra_suffix).collect{|a| a.relative_url})
|
18
20
|
end
|