Initial commit
This commit is contained in:
13
app/jobs/attach_contract_to_releasable_job.rb
Normal file
13
app/jobs/attach_contract_to_releasable_job.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class AttachContractToReleasableJob < ApplicationJob
|
||||
queue_as :default
|
||||
|
||||
def perform(releasable)
|
||||
contract = Contract.new(releasable)
|
||||
|
||||
releasable.contract.attach({
|
||||
io: contract.to_pdf,
|
||||
filename: contract.filename,
|
||||
content_type: "application/pdf"
|
||||
})
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user