couldn't you do @host.update_attribute!(:ip, ip) instead? I'm quite certain it will be a noop if the attribute value doesn't change...