Newer
Older
class UserDeviseSerializer < ActiveModel::Serializer
def avatar_file_name
object.avatar.url
end
def cover_file_name
object.cover.url
end
attributes :id, :email, :provider, :avatar_file_name, :avatar_content_type, :uid, :name, :avatar_file_size, :avatar_updated_at,
:bookmarks_count, :user_category_id, :score, :follows_count, :deleted_at, :description, :likes_count,
:learning_objects_count, :collections_count, :cover_file_name, :cover_content_type, :cover_file_size, :cover_updated_at