Class: Goldencobra::Location

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/goldencobra/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#skip_geocodeObject

Returns the value of attribute skip_geocode.



25
26
27
# File 'app/models/goldencobra/location.rb', line 25

def skip_geocode
  @skip_geocode
end

Instance Method Details

#complete_locationObject



29
30
31
32
33
34
35
# File 'app/models/goldencobra/location.rb', line 29

def complete_location
  result = ""
  result += "#{self.street}" if self.street.present?
  result += " #{self.street_number}" if self.street_number.present?
  result += ", #{self.zip}" if self.zip.present?
  result += " #{self.city}" if self.city.present?
end

#skip_geocoding_once_or_alwaysObject



41
42
43
# File 'app/models/goldencobra/location.rb', line 41

def skip_geocoding_once_or_always
  self.skip_geocode || self.manual_geocoding
end

#titleObject



37
38
39
# File 'app/models/goldencobra/location.rb', line 37

def title
  self.complete_location
end