Module: Pageflow::HostedFile::ClassMethods

Defined in:
app/models/concerns/pageflow/hosted_file.rb

Instance Method Summary collapse

Instance Method Details

#processing_state_machine(&block) ⇒ Object


80
81
82
83
84
85
86
87
88
89
90
# File 'app/models/concerns/pageflow/hosted_file.rb', line 80

def processing_state_machine(&block)
  state_machine do
    extend StateMachineJob::Macro

    after_transition(any => 'uploaded_to_s3') do |hosted_file|
      hosted_file.process!
    end

    instance_eval(&block)
  end
end