Sha256: 44079c7e512552252bf5251475f539adf71b1e912beb8ae2f0aad2235a547061
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
h1. Webshims-rails Easily include the "webshims library":http://aFarkas.github.com/webshim/demos/index.html (by Alexander Farkas) in your Rails 3.1+ project with the asset pipeline. h2. Usage 1. Add webshims-rails to your Gemfile for bundler: @gem 'webshims-rails'@ 2. Require modernizr and the webshims polyfiller, eg, in your application.js: *Update note:* Previous webshims-rails included only the minified versions; this was incorrect, since the dev (unminified) versions should be required by Sprockets and then the Rails asset pipeline will compress as necessary in production. Users of previous webshims-rails versions should update their sprockets requires and webshims options as below (though I'll leave the minified assets in there to prevent errors). <pre> //= require webshims/dev/extras/modernizr-custom //= require webshims/dev/polyfiller </pre> 3. In your javascript, after the polyfiller has been required, set the basePath for webshims as shown below, and then call $.webshims.polyfill(); see webshims docs for more options. (Note that this should be run directly, not in a dom-ready block.) <pre> $.webshims.setOptions('basePath', '/assets/webshims/dev/shims/') $.webshims.polyfill() </pre> h2. License MIT licensed, like the Webshims library.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
webshims-rails-0.4 | readme.textile |