From 325e28c3c82b879ac71bfe5d8a20450e98e17092 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 8 Mar 2013 17:24:10 -0800 Subject: [PATCH] wrong conditional --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 384041a199d..f1e1e035c86 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -288,7 +288,7 @@ class User < ActiveRecord::Base end def update_ip_address!(new_ip_address) - unless ip_address == new_ip_address && new_ip_address.blank? + unless ip_address == new_ip_address || new_ip_address.blank? update_column(:ip_address, new_ip_address) end end