mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 09:17:30 +08:00
bcc80e0ea8
User bookmarks can now be searched by name or post raw content. The q querystring param is hooked up from the Ember router as well.
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
|