Module: VestalVersions::Deletion::ClassMethods

Defined in:
lib/vestal_versions/deletion.rb

Overview

Class methods on ActiveRecord::Base

Instance Method Summary collapse

Instance Method Details

#prepare_versioned_options_with_deletion(options) ⇒ Object

After the original prepare_versioned_options method cleans the given options, this alias also extracts the :depedent if it set to :tracking



22
23
24
25
26
27
28
29
30
# File 'lib/vestal_versions/deletion.rb', line 22

def prepare_versioned_options_with_deletion(options)
  result = prepare_versioned_options_without_deletion(options)
  if result[:dependent] == :tracking
    self.vestal_versions_options[:track_destroy] = true
    options.delete(:dependent)
  end

  result
end