Sha256: 9d01b3b3ae5eb056df001bafefc6a3c76146d1d297b7d1e3ee7c6a0385f65ea0

Contents?: true

Size: 338 Bytes

Versions: 16

Compression:

Stored size: 338 Bytes

Contents

module Ahoy
  class GeocodeJob < ActiveJob::Base
    queue_as :ahoy

    def perform(visit)
      deckhand = Deckhands::LocationDeckhand.new(visit.ip)
      Ahoy::VisitProperties::LOCATION_KEYS.each do |key|
        visit.send(:"#{key}=", deckhand.send(key)) if visit.respond_to?(:"#{key}=")
      end
      visit.save!
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ahoy_matey-1.6.1 lib/ahoy/geocode_job.rb
ahoy_matey-1.6.0 lib/ahoy/geocode_job.rb
ahoy_matey-1.5.5 lib/ahoy/geocode_job.rb
ahoy_matey-1.5.4 lib/ahoy/geocode_job.rb
ahoy_matey-1.5.3 lib/ahoy/geocode_job.rb
ahoy_matey-1.5.2 lib/ahoy/geocode_job.rb
ahoy_matey-1.5.1 lib/ahoy/geocode_job.rb
ahoy_matey-1.5.0 lib/ahoy/geocode_job.rb
ahoy_matey-1.4.2 lib/ahoy/geocode_job.rb
ahoy_matey-1.4.1 lib/ahoy/geocode_job.rb
ahoy_matey-1.4.0 lib/ahoy/geocode_job.rb
ahoy_matey-1.3.1 lib/ahoy/geocode_job.rb
ahoy_matey-1.3.0 lib/ahoy/geocode_job.rb
ahoy_matey-1.2.2 lib/ahoy/geocode_job.rb
ahoy_matey-1.2.1 lib/ahoy/geocode_job.rb
ahoy_matey-1.2.0 lib/ahoy/geocode_job.rb