Class: HiddenProfileSerializer

Inherits:
BasicUserSerializer show all
Defined in:
app/serializers/hidden_profile_serializer.rb

Instance Method Summary collapse

Methods inherited from BasicUserSerializer

#avatar_template, #categories_with_notification_level, #category_user_notification_levels, #include_name?, #name, #user, #user_is_current_user

Methods included from UserStatusMixin

#include_status?, included, #status

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#can_send_private_message_to_userObject



10
11
12
# File 'app/serializers/hidden_profile_serializer.rb', line 10

def can_send_private_message_to_user
  scope.can_send_private_message?(object)
end

#primary_group_nameObject



14
15
16
# File 'app/serializers/hidden_profile_serializer.rb', line 14

def primary_group_name
  object.primary_group.try(:name)
end

#profile_hidden?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/serializers/hidden_profile_serializer.rb', line 6

def profile_hidden?
  true
end