Module: VestalVersions::Creation::ClassMethods
- Defined in:
- lib/vestal_versions/creation.rb
Overview
Class methods added to ActiveRecord::Base to facilitate the creation of new versions.
Instance Method Summary collapse
-
#prepare_versioned_options(options) ⇒ Object
Overrides the basal
prepare_versioned_options
method defined in VestalVersions::Options to extract the:only
,:except
and:initial_version
options intovestal_versions_options
.
Instance Method Details
#prepare_versioned_options(options) ⇒ Object
Overrides the basal prepare_versioned_options
method defined in VestalVersions::Options to extract the :only
, :except
and :initial_version
options into vestal_versions_options
.
18 19 20 21 22 23 24 25 26 |
# File 'lib/vestal_versions/creation.rb', line 18 def () result = super() self.[:only] = Array(.delete(:only)).map(&:to_s).uniq if [:only] self.[:except] = Array(.delete(:except)).map(&:to_s).uniq if [:except] self.[:initial_version] = .delete(:initial_version) result end |