This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Task to generate XML file for JobG8" | |
task xmlbuilder_jobg8: :environment do | |
@bids = Bid.jg8.cpc.includes(:campaign, :job).joins(:job).merge(Job.on_trip.live) | |
builder = Nokogiri::XML::Builder.new do |xml| | |
xml.jobs { | |
@bids.each do |bid| | |
xml.job { | |
xml.SenderReference { xml.cdata(bid.job_jbio_no.to_s) } | |
xml.Position { xml.cdata(bid.job_title) } | |
xml.AdvertiserName { xml.cdata(bid.job_employer) } |