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



87
88
89
90
91
92
93
94
95
96
97
# File 'app/models/concerns/pageflow/hosted_file.rb', line 87

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