Class: MobileWorkflow::AddAttachmentJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- MobileWorkflow::AddAttachmentJob
- Defined in:
- app/jobs/mobile_workflow/add_attachment_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(object, object_key, attribute_name) ⇒ Object
5 6 7 8 9 10 |
# File 'app/jobs/mobile_workflow/add_attachment_job.rb', line 5 def perform(object, object_key, attribute_name) object.send("#{attribute_name}=", active_record_blob_from_s3(object_key)) Rails.logger.warn "Error saving object: #{object} #{object.errors.}" unless object.save rescue NoMethodError => e Rails.logger.warn "Error attaching object: #{e.}" end |