2012-10-01 12:29:36 +00:00
|
|
|
# Sisyphus::Rails
|
|
|
|
|
|
|
|
A gem to add gmail like form saving through sisyphus.js
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
Add this line to your application's Gemfile:
|
|
|
|
|
|
|
|
gem 'sisyphus-rails'
|
|
|
|
|
|
|
|
And then execute:
|
|
|
|
|
|
|
|
$ bundle
|
|
|
|
|
|
|
|
Or install it yourself as:
|
|
|
|
|
|
|
|
$ gem install sisyphus-rails
|
|
|
|
|
2012-10-01 14:37:28 +00:00
|
|
|
For a basic install include the following in your ++app/assets/javascripts/application.js++ file
|
|
|
|
|
|
|
|
//= require jstorage
|
|
|
|
//= require sisyphus
|
|
|
|
|
2012-10-01 12:29:36 +00:00
|
|
|
## Usage
|
|
|
|
|
2012-10-01 14:37:28 +00:00
|
|
|
If you are using the default form builder you do not have to modify anything to have Sisyphus start auto-saving your forms.
|
|
|
|
|
|
|
|
ActionView::Base.default_form_builder = YourFormBuilder
|
|
|
|
|
|
|
|
## Dependencies
|
|
|
|
|
|
|
|
- Rails >= 3.1
|
|
|
|
- Jquery
|
2012-10-01 12:29:36 +00:00
|
|
|
|
|
|
|
## TODO
|
|
|
|
|
2012-10-01 17:08:48 +00:00
|
|
|
- Fix the double script tag issue caused by the initialization of the builder twice, once in form_for and once in fields_for right below it
|
2012-10-01 12:29:36 +00:00
|
|
|
- Tests
|
|
|
|
- Multiple library support for jStorage (Prototype, Mootools etc.)
|
|
|
|
- Support for formtastic and extending other form builders
|
2012-10-01 14:37:28 +00:00
|
|
|
- Model/Object based exclusions
|
2012-10-01 12:29:36 +00:00
|
|
|
|
|
|
|
## Contributing
|
|
|
|
|
|
|
|
1. Fork it
|
|
|
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
|
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
|
|
4. Push to the branch (`git push origin my-new-feature`)
|
|
|
|
5. Create new Pull Request
|
|
|
|
|
|
|
|
## Dependencies
|
|
|
|
|
|
|
|
https://github.com/simsalabim/sisyphus
|
|
|
|
https://github.com/andris9/jStorage
|