This gem requires Rails >= 3.2.
In config/routes.rb initiate the Appcache::Manifest.new
inside the routes.draw block, like so:
YourApp::Application.routes.draw do
Appcache::Manifest.new
end
Variables | Values |
---|---|
version | nil |
network | ['*'] |
fallback | [] |
manifest_url | '/application.manifest' |
files | [] |
include_asset_pipeline_manifest_yaml | true |
YourApp::Application.routes.draw do
Appcache::Manifest.configure do
config.version = Rails.application.config.assets.version
files = Dir['public/assets/images/**/*']
for file in files
config.files << file.gsub('public','') if Pathname.new(file).file?
end
config.files << "/assets/my_custom.css"
end
end