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



105
106
107
108
109
110
111
112
113
114
115
# File 'app/models/concerns/pageflow/hosted_file.rb', line 105

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