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.



27
28
29
# File 'app/models/goldencobra/location.rb', line 27

def skip_geocode
  @skip_geocode
end

Instance Method Details

#complete_locationObject



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

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



43
44
45
# File 'app/models/goldencobra/location.rb', line 43

def skip_geocoding_once_or_always
  (Goldencobra::Setting.for_key("goldencobra.locations.geocoding") == "false" ) || self.skip_geocode || self.manual_geocoding
end

#titleObject



39
40
41
# File 'app/models/goldencobra/location.rb', line 39

def title
  self.complete_location
end