Skip to content

Commit

Permalink
Fix: 某些丢失用户调用helper修正
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Apr 27, 2011
1 parent 4b0132d commit 7ed0aac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/helpers/users_helper.rb
Expand Up @@ -24,12 +24,14 @@ def user_avatar_tag(user,size)
end

def user_tagline_tag(user,options = {})
return "" if user.blank?
prefix = options[:prefix] || ""
return "" if user.tagline.blank?
raw "#{prefix}#{truncate(user.tagline, :length => 30)}"
end

def user_sex_title(user)
return "" if user.blank?
if current_user
return "我" if user.id == current_user.id
end
Expand Down

0 comments on commit 7ed0aac

Please sign in to comment.