method
include_tag

v3.2.13 -
Show latest stable
-
0 notes -
Class: AssetIncludeTag
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
include_tag(*sources)
public
Hide source
# File actionpack/lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb, line 41 def include_tag(*sources) options = sources.extract_options!.stringify_keys concat = options.delete("concat") cache = concat || options.delete("cache") recursive = options.delete("recursive") if concat || (config.perform_caching && cache) joined_name = (cache == true ? "all" : cache) + ".#{extension}" joined_path = File.join((joined_name[/^#{File::SEPARATOR}/] ? config.assets_dir : custom_dir), joined_name) unless config.perform_caching && File.exists?(joined_path) write_asset_file_contents(joined_path, compute_paths(sources, recursive)) end asset_tag(joined_name, options) else sources = expand_sources(sources, recursive) ensure_sources!(sources) if cache sources.collect { |source| asset_tag(source, options) }.join("\n").html_safe end end