Sha256: 0202c9b1808a2f065c3e79b2c659fd19620c68aa932c8ffe9e1be4dee8ee0203

Contents?: true

Size: 495 Bytes

Versions: 7

Compression:

Stored size: 495 Bytes

Contents

module ExpectedBehavior
  module ActsAsArchival
    module AssociationOperation
      class Archive < Base

        protected

        def act_on_archivals(archivals)
          archivals.unarchived.find_each do |related_record|
            raise ActiveRecord::Rollback unless related_record.archive(head_archive_number)
          end
        end

        def association_conditions_met?(association)
          association.options[:dependent] == :destroy
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
acts_as_archival-1.2.0 lib/expected_behavior/association_operation/archive.rb
acts_as_archival-1.1.1 lib/expected_behavior/association_operation/archive.rb
acts_as_archival-1.1.0 lib/expected_behavior/association_operation/archive.rb
acts_as_archival-1.0.0 lib/expected_behavior/association_operation/archive.rb
acts_as_archival-0.6.1 lib/expected_behavior/association_operation/archive.rb
acts_as_archival-0.6.0 lib/expected_behavior/association_operation/archive.rb
acts_as_archival-0.5.3 lib/expected_behavior/association_operation/archive.rb