Skip to content

Instantly share code, notes, and snippets.

@kris-luminar
Created December 11, 2012 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kris-luminar/4263503 to your computer and use it in GitHub Desktop.
Save kris-luminar/4263503 to your computer and use it in GitHub Desktop.
diff --git i/vendor/plugins/addressable/lib/addressable.rb w/vendor/plugins/addressable/lib/addressable.rb
index 59e402c..054a9b5 100644
--- i/vendor/plugins/addressable/lib/addressable.rb
+++ w/vendor/plugins/addressable/lib/addressable.rb
@@ -116,7 +116,7 @@ module Addressable
if has_latlng_fields?
build_geocode unless geocode
- if address.blank? and latitude.blank? and longitude.blank?
+ if address.blank? and latitude.to_f == 0.0 and longitude.to_f == 0.0
geocode.destroy
elsif latitude.present? and longitude.present?
geocode.update_attributes(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment