Class: UserWordpressSerializer

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

Instance Method Summary collapse

Methods inherited from BasicUserSerializer

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

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#avatar_templateObject



4
5
6
7
8
9
10
# File 'app/serializers/user_wordpress_serializer.rb', line 4

def avatar_template
  if Hash === object
    UrlHelper.absolute User.avatar_template(user[:username], user[:uploaded_avatar_id])
  else
    UrlHelper.absolute object.avatar_template
  end
end