discourse/app/serializers/user_bookmark_list_serializ...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
319 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class UserBookmarkListSerializer < ApplicationSerializer
attributes :more_bookmarks_url
has_many :bookmarks, serializer: UserBookmarkSerializer, embed: :objects
def include_more_bookmarks_url?
@include_more_bookmarks_url ||= object.bookmarks.size == object.per_page
end
end