12 lines
319 B
Ruby
12 lines
319 B
Ruby
# 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
|