Undo

Build Status Coverage Status Code Climate Gemnasium Build Status Gem Version

Rails.cache adapter for Undo gem. Designed to be used with Rails cache, but it can be used with any similarly quaking cache store. Rails constant may not even be defined.

Contents

  1. Installation
  2. Usage
  3. Requirements
  4. Contacts
  5. Compatibility
  6. Contributing
  7. Copyright

Installation

Add this line to your application's Gemfile:

gem 'undo-storage-rails_cache'

And then execute:

$ bundle

Or install it yourself as:

$ gem install undo-storage-rails_cache

Usage

Undo.configure do |config|
  config.storage = Undo::Storage::RailsCache.new
end

Default options will applied on each call to cache storage:

Undo.configure do |config|
  config.storage = Undo::Storage::RailsCache.new(expires_in: 1.hour)
end

As any Undo storage it gets argument bypassed from #store, #restore and #wrap:

Undo.store object, expires_in: 1.minute

Requirements

  1. Ruby 1.9 or above
  2. The Undo.

Contacts

Have questions or recommendations? Contact me via [email protected]
Found a bug or have enhancement request? You are welcome at Github bugtracker

Compatibility

tested with Ruby

  • 2.1
  • 2.0
  • 1.9.3
  • ruby-head
  • rbx
  • jruby-19mode
  • jruby-head

See build history

Contributing

  1. Fork repository
  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

Copyright © 2014 Alexander Paramonov. Released under the MIT License. See the LICENSE file for further details.