Commit 9035f7f4

mo khan <mo@mokhan.ca>
2013-07-02 20:01:56
remove condition to check if we should re-geocode
1 parent f696dbd
Changed files (1)
app
models
app/models/user.rb
@@ -3,7 +3,7 @@ class User < ActiveRecord::Base
   tracked
   geocoded_by :current_sign_in_ip, :latitude => :latitude, :longitude => :longitude
   reverse_geocoded_by :latitude, :longitude, :address => :city
-  after_validation :geocode, :reverse_geocode, :if => lambda { |x| x.last_sign_in_ip_changed? }
+  after_validation :geocode, :reverse_geocode
   validates :name,  :presence => true
   validates :website, :format => URI::regexp(%w(http https)), :allow_blank => true
   devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable