Class: UserBookmarkBaseSerializer

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

Direct Known Subclasses

UserPostTopicBookmarkBaseSerializer

Instance Method Summary collapse

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#bookmarkable_urlObject

Raises:

  • (NotImplementedError)


31
32
33
# File 'app/serializers/user_bookmark_base_serializer.rb', line 31

def bookmarkable_url
  raise NotImplementedError
end

#cookedObject

Raises:

  • (NotImplementedError)


27
28
29
# File 'app/serializers/user_bookmark_base_serializer.rb', line 27

def cooked
  raise NotImplementedError
end

#excerptObject

Raises:

  • (NotImplementedError)


35
36
37
# File 'app/serializers/user_bookmark_base_serializer.rb', line 35

def excerpt
  raise NotImplementedError
end

#fancy_titleObject

Raises:

  • (NotImplementedError)


23
24
25
# File 'app/serializers/user_bookmark_base_serializer.rb', line 23

def fancy_title
  raise NotImplementedError
end

#include_reminder_at_ics_end?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'app/serializers/user_bookmark_base_serializer.rb', line 43

def include_reminder_at_ics_end?
  reminder_at.present?
end

#include_reminder_at_ics_start?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'app/serializers/user_bookmark_base_serializer.rb', line 39

def include_reminder_at_ics_start?
  reminder_at.present?
end

#reminder_at_ics_endObject



51
52
53
# File 'app/serializers/user_bookmark_base_serializer.rb', line 51

def reminder_at_ics_end
  object.reminder_at_ics(offset: 1.hour)
end

#reminder_at_ics_startObject



47
48
49
# File 'app/serializers/user_bookmark_base_serializer.rb', line 47

def reminder_at_ics_start
  object.reminder_at_ics
end

#titleObject

Raises:

  • (NotImplementedError)


19
20
21
# File 'app/serializers/user_bookmark_base_serializer.rb', line 19

def title
  raise NotImplementedError
end

#userObject



59
60
61
# File 'app/serializers/user_bookmark_base_serializer.rb', line 59

def user
  bookmarkable_user
end