Class: Glengarry::EmailLead

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
Geocoder::Model::ActiveRecord
Defined in:
app/models/glengarry/email_lead.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.activateObject



20
21
22
23
# File 'app/models/glengarry/email_lead.rb', line 20

def self.activate
  self.active = true
  save!
end

Instance Method Details

#set_reversed_location(results) ⇒ Object



25
26
27
28
29
30
# File 'app/models/glengarry/email_lead.rb', line 25

def set_reversed_location(results)
  if geo = results.first
    self.city = geo.city
    self.country = geo.country
  end
end