mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 06:43:40 +08:00
12 lines
287 B
Ruby
12 lines
287 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?
|
||
|
object.bookmarks.size == object.per_page
|
||
|
end
|
||
|
end
|