sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::Loader#store_asset

Internal: Save a given asset to the cache

asset - A hash containing values of loaded asset
unloaded - The UnloadedAsset used to lookup the `asset`

This method converts all absolute paths to "compressed" paths
which are relative if they're in the root.

Source | Google | Stack overflow

Edit

git clone [email protected]:rails/sprockets.git

cd sprockets

open lib/sprockets/loader.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--Loader-store_asset-for-pr


# Commit to git

git add lib/sprockets/loader.rbgit commit -m "better docs for Sprockets::Loader#store_asset"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Sprockets--Loader-store_asset-for-pr

hub pull-request


# Celebrate!