Sha256: 49b7a5b46bcbc4827b3825b5001545d4b0318d388185e6734d5445443e8a5cff

Contents?: true

Size: 413 Bytes

Versions: 4

Compression:

Stored size: 413 Bytes

Contents

module ExpectedBehavior
  module ActsAsArchival
    module AssociationOperation
      class Unarchive < Base

        protected

        def act_on_archivals(scope)
          scope.archived.where(archive_number: head_archive_number).find_each do |related_record|
            raise ActiveRecord::Rollback unless related_record.unarchive!(head_archive_number)
          end
        end

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
acts_as_archival-2.1.0 lib/expected_behavior/association_operation/unarchive.rb
acts_as_archival-2.0.0 lib/expected_behavior/association_operation/unarchive.rb
acts_as_archival-1.4.0 lib/expected_behavior/association_operation/unarchive.rb
acts_as_archival-1.3.0 lib/expected_behavior/association_operation/unarchive.rb