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_with_creation(options) ⇒ Object
Overrides the basal
prepare_versioned_options
method defined in VestalVersions::Options to extract the:only
and:except
options intovestal_versions_options
.
Instance Method Details
#prepare_versioned_options_with_creation(options) ⇒ Object
Overrides the basal prepare_versioned_options
method defined in VestalVersions::Options to extract the :only
and :except
options into vestal_versions_options
.
23 24 25 26 27 28 29 30 |
# File 'lib/vestal_versions/creation.rb', line 23 def () result = () self.[:only] = Array(.delete(:only)).map(&:to_s).uniq if [:only] self.[:except] = Array(.delete(:except)).map(&:to_s).uniq if [:except] result end |