14 lines
293 B
Ruby
14 lines
293 B
Ruby
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
|