Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Embed images and fonts into CSS with the Rails asset pipeline
Ruby
branch: master

This branch is 1 commit ahead of saulabs:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
Gemfile
LICENCE
README.md
Rakefile
embed-assets-rails.gemspec

README.md

Embedding Assets

This gem provides integration of embedding images and fonts into CSS files within the Rails asset pipeline. More about embedding assets and how it works, see the jammit documentation. This gem actually reuses code from that project.

Installing

Add the following to your Gemfile:

gem 'embed-assets-rails'

Configuration

To enable embedding the assets set config.assets.embed_assets to true.

Example

MyProject::Application.configure do
  config.assets.embed_assets = true
end

Notes

  • Rails 3.1 and up only
  • Only supports images and font in public/ directory (yet)

Thanks

Thanks to documentcloud for creating jammit.

Running Tests

$ bundle install
$ bundle exec rake test
Something went wrong with that request. Please try again.