method

write_asset_file_contents

rails latest stable - Class: ActionView::Helpers::AssetTagHelper

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

write_asset_file_contents(joined_asset_path, asset_paths)
private

No documentation available.

# File actionpack/lib/action_view/helpers/asset_tag_helper.rb, line 891
        def write_asset_file_contents(joined_asset_path, asset_paths)

          FileUtils.mkdir_p(File.dirname(joined_asset_path))
          File.atomic_write(joined_asset_path) { |cache| cache.write(join_asset_file_contents(asset_paths)) }

          # Set mtime to the latest of the combined files to allow for
          # consistent ETag without a shared filesystem.
          mt = asset_paths.map { |p| File.mtime(asset_file_path(p)) }.max
          File.utime(mt, mt, joined_asset_path)
        end