Sha256: 775c078549ccc4b6746a2a486f7053a8c7157151ceaa45d09050d37536bd770c

Contents?: true

Size: 1.01 KB

Versions: 10

Compression:

Stored size: 1.01 KB

Contents

class Card
  class ActManager
    class StageDirector
      module Phases
        def validation_phase
          run_single_stage :initialize
          run_single_stage :prepare_to_validate
          run_single_stage :validate
        ensure
          # @card.expire_pieces if @card.errors.any?
          @card.errors.empty?
        end

        def storage_phase &block
          catch_up_to_stage :prepare_to_store
          run_single_stage :store, &block
          run_single_stage :finalize
          raise ActiveRecord::RecordInvalid, @card if @card.errors.any?
        ensure
          @from_trash = nil
        end

        def integration_phase
          return if @abort

          @card.restore_changes_information
          run_single_stage :integrate
          run_single_stage :after_integrate
          run_single_stage :integrate_with_delay
        ensure
          @card.clear_changes_information unless @abort
          # ActManager.clear if main? && !@card.only_storage_phase
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
card-1.99.6 lib/card/act_manager/stage_director/phases.rb
card-1.99.5 lib/card/act_manager/stage_director/phases.rb
card-1.99.4 lib/card/act_manager/stage_director/phases.rb
card-1.99.3 lib/card/act_manager/stage_director/phases.rb
card-1.99.2 lib/card/act_manager/stage_director/phases.rb
card-1.99.1 lib/card/act_manager/stage_director/phases.rb
card-1.99.0 lib/card/act_manager/stage_director/phases.rb
card-1.98.3 lib/card/act_manager/stage_director/phases.rb
card-1.98.2 lib/card/act_manager/stage_director/phases.rb
card-1.98.1 lib/card/act_manager/stage_director/phases.rb