Class: UserDetailSerializer

Inherits:
UserSerializer show all
Defined in:
app/serializers/user_detail_serializer.rb

Instance Method Summary collapse

Methods inherited from UserSerializer

#avatar_url

Methods inherited from BaseSerializer

#abilities, #cache, #can?, #current_ability, #owner?

Instance Method Details

#emailObject


8
9
10
11
12
13
14
# File 'app/serializers/user_detail_serializer.rb', line 8

def email
  if owner? || object.email_public == true
    object.email
  else
    ''
  end
end