Commit 9035f7f4
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