Class: Goldencobra::Location
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Goldencobra::Location
- Defined in:
- app/models/goldencobra/location.rb
Instance Attribute Summary collapse
-
#skip_geocode ⇒ Object
Returns the value of attribute skip_geocode.
Instance Method Summary collapse
Instance Attribute Details
#skip_geocode ⇒ Object
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_location ⇒ Object
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_always ⇒ Object
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 |
#title ⇒ Object
39 40 41 |
# File 'app/models/goldencobra/location.rb', line 39 def title self.complete_location end |