localstorageshim-rails
Rails wrapper for https://github.com/mattpowell/localstorageshim
Installation
Add this line to your application's Gemfile:
gem 'localstorageshim-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install localstorageshim-rails
Usage
localstorage.js
will be automatically added to config.assets.precompile
, so it will be compiled when you run rake assets:precompile
.
In your application layout, add the following line (for ERb):
<%= localstorage_shim %>
This will add a conditional comment to load the localstorage shim for IE 6 & 7.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request