Module: VestalVersions::Creation
- Defined in:
- lib/vestal_versions/creation.rb
Overview
Adds the functionality necessary to control version creation on a versioned instance of ActiveRecord::Base.
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
:nodoc:.
Class Method Details
.included(base) ⇒ Object
:nodoc:
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/vestal_versions/creation.rb', line 5 def self.included(base) # :nodoc: base.class_eval do extend ClassMethods include InstanceMethods after_update :create_version, :if => :create_version? after_update :update_version, :if => :update_version? class << self alias_method_chain :prepare_versioned_options, :creation end end end |