Modernizr for rails asset pipeline
modernizr_rails gem integrates the
Modernizr with the Rails asset pipeline.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install modernizr_rails
There is two ways to use this gem. If you don't know which feature you'll need to test, add this line to your
This will load all test scripts, including the
Modernizr.load conditional script loader, based on yepnope.js.
//= require modernizr-canvas //= require modernizr-fontface //= require modernizrtextshadow
This will also load the
Modernizr.load conditional script loader.
If you need standalone
modernizr.js file, you should add it to precompile list in
config.assets.precompile += %W( modernizr.js )
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
Modernizr is available under the MIT licenses.
Other parts of gem use MIT license.