Skip to content

antoinegrant/appcache-manifest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppCache Manifest

This gem requires Rails >= 3.2.

Configurations

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

The default are:

Variables Values
version nil
network ['*']
fallback []
manifest_url '/application.manifest'
files []
include_asset_pipeline_manifest_yaml true

Configure inside the block

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages