Class: UserBookmarkListSerializer

Inherits:
ApplicationSerializer show all
Defined in:
app/serializers/user_bookmark_list_serializer.rb

Instance Method Summary collapse

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#bookmarksObject



6
7
8
9
10
11
12
13
14
15
# File 'app/serializers/user_bookmark_list_serializer.rb', line 6

def bookmarks
  object.bookmarks.map do |bm|
    bm.registered_bookmarkable.serializer.new(
      bm,
      **object.bookmark_serializer_opts,
      scope: scope,
      root: false,
    )
  end
end

#include_more_bookmarks_url?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/serializers/user_bookmark_list_serializer.rb', line 17

def include_more_bookmarks_url?
  @include_more_bookmarks_url ||= object.has_more
end