Skip to content

Instantly share code, notes, and snippets.

Avatar

guillermo haas-thompson memoht

View GitHub Profile
@memoht
memoht / feed.rake
Created Feb 18, 2021
Sample of XML file generation
View feed.rake
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) }
@memoht
memoht / _bid.html.erb
Last active Aug 28, 2019
My Rails 6 upgrade application.js file in progress
View _bid.html.erb
<tr id="<%= dom_id(bid) %>">
<td class="<%= bid.job_status %>">
<%= link_to bid.job_job_id, bid.job, target: "_blank" %>
</td>
<td><%= bid.job_title_plus_company %></td>
<td><%= bid.job_location_description %></td>
<td><%= t(bid.partner) %></td>
<td><%= bid.campaign_level_plus_amount %></td>
<td>
<div class="btn-group dropleft">