Sha256: 9e1289399d6a18822acb294230021e41fc6346dba42d21e12f89dd4c053530cc
Contents?: true
Size: 752 Bytes
Versions: 3
Compression:
Stored size: 752 Bytes
Contents
#!/usr/bin/env ruby require "bundler/setup" require "usable" # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. # (If you use this, don't forget to add pry to your Gemfile!) # require "pry" # Pry.start module VersionKit def save_version "Saving up to #{self.class.usable_config.max_versions} versions to #{self.class.usable_config.table_name}" end def destroy_version "Deleting versions from #{self.class.usable_config.table_name}" end end class Model extend Usable usable VersionKit, only: :save_version do |config| config.max_versions = 10 config.table_name = 'custom_versions' end end require "irb" IRB.start
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
usable-1.1.1 | bin/console |
usable-1.1.0 | bin/console |
usable-1.0.0 | bin/console |