From c42a63ea4e6957f3c61ef51ce1772c8bf0e778bc Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 15 Apr 2015 10:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/mobile/entities/user.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/mobile/entities/user.rb b/app/api/mobile/entities/user.rb index 1f52ae841..9112e7ec5 100644 --- a/app/api/mobile/entities/user.rb +++ b/app/api/mobile/entities/user.rb @@ -15,13 +15,13 @@ module Mobile when :img_url url_to_avatar(u) when :gender - u.user_extensions.gender.nil? ? 0 : u.user_extensions.gender + u.nil? || u.user_extensions.nil? || u.user_extensions.gender.nil? ? 0 : u.user_extensions.gender when :work_unit get_user_work_unit u when :location get_user_location u when :brief_introduction - u.user_extensions.brief_introduction + u.nil? || u.user_extensions.nil? ? "" : u.user_extensions.brief_introduction end end end