Class: WebHookTopicViewSerializer

Inherits:
TopicViewSerializer show all
Defined in:
app/serializers/web_hook_topic_view_serializer.rb

Instance Method Summary collapse

Methods inherited from TopicViewSerializer

#actions_summary, attributes_from_topic, #bookmarked, #bookmarks, #chunk_size, #current_post_number, #deleted_by, #destination_category_id, #details, #draft, #draft_key, #draft_sequence, #expandable_first_post, #has_deleted, #has_topic_user?, #highest_post_number, #include_current_post_number?, #include_destination_category_id?, #include_expandable_first_post?, #include_external_id?, #include_featured_link?, #include_featured_link_root_domain?, #include_has_deleted?, #include_is_warning?, #include_message_archived?, #include_pending_posts?, #include_pm_with_non_human_user?, #include_published_page?, #include_queued_posts_count?, #include_requested_group_name?, #include_unicode_title?, #include_user_last_posted_at?, #is_shared_draft, #is_warning, #last_read_post_id, #last_read_post_number, #message_archived, #message_bus_last_id, #participant_count, #pinned, #pm_with_non_human_user, #posted, #queued_posts_count, #requested_group_name, #show_read_indicator, #slow_mode_enabled_until, #summarizable, #thumbnails, #topic_timer, #unicode_title, #unpinned, #user_last_posted_at

Methods included from ApplicationHelper

#add_resource_preload_list, #admin?, #age_words, all_connectors, #allow_plugins?, #allow_third_party_plugins?, #application_logo_dark_url, #application_logo_url, #authentication_data, #body_classes, #build_plugin_html, #can_sign_up?, #category_badge, #client_side_setup_data, #crawlable_meta_data, #crawler_layout?, #current_homepage, #customization_disabled?, #dark_color_scheme?, #dark_scheme_id, #discourse_color_scheme_stylesheets, #discourse_config_environment, #discourse_csrf_tags, #discourse_preload_color_scheme_stylesheets, #discourse_stylesheet_link_tag, #discourse_stylesheet_preload_tag, #discourse_theme_color_meta_tags, #escape_unicode, extra_body_classes, #format_topic_title, #ga_universal_json, #get_absolute_image_url, #google_tag_manager_json, #google_tag_manager_nonce_placeholder, #google_universal_analytics_json, #gsub_emoji_to_unicode, #guardian, #html_classes, #html_lang, #include_crawler_content?, #include_ios_native_app_banner?, #include_splash_screen?, #ios_app_argument, #ios_device?, #is_brotli_req?, #is_gzip_req?, #loading_admin?, #login_path, #manifest_url, #mobile_device?, #mobile_view?, #moderator?, #modern_mobile_device?, #normalized_safe_mode, #preload_script, #preload_script_url, #preloaded_json, #render_sitelinks_search_tag, #replace_plugin_html, #rss_creator, #rtl?, #scheme_id, #script_asset_path, #server_plugin_outlet, #shared_session_key, #short_date, #staff?, #stylesheet_manager, #text_size_class, #theme_id, #theme_js_lookup, #theme_lookup, #theme_translations_lookup, #topic_featured_link_domain, #waving_hand_url, #with_format

Methods included from GlobalPath

#cdn_path, #cdn_relative_path, #full_cdn_url, #path, #upload_cdn_path

Methods included from ConfigurableUrls

#faq_path, #privacy_policy_url, #tos_url

Methods included from CanonicalURL::Helpers

#canonical_link_tag

Methods included from CurrentUser

#clear_current_user, #current_user, has_auth_cookie?, #is_api?, #is_user_api?, #log_off_user, #log_on_user, lookup_from_env, #refresh_session

Methods included from TopicTagsMixin

#include_tags?, included, #tags, #tags_descriptions, #topic

Methods included from SuggestedTopicsMixin

#include_related_messages?, #include_suggested_group_name?, #include_suggested_topics?, included, #related_messages, #suggested_group_name, #suggested_topics

Methods included from PostStreamSerializerMixin

#include_gaps?, #include_stream?, #include_timeline_lookup?, included, #post_stream, #posts, #timeline_lookup

Methods inherited from ApplicationSerializer

expire_cache_fragment!, fragment_cache

Methods inherited from ActiveModel::Serializer

#include!

Instance Method Details

#created_byObject



32
33
34
# File 'app/serializers/web_hook_topic_view_serializer.rb', line 32

def created_by
  BasicUserSerializer.new(object.topic.user, scope: scope, root: false)
end

#include_show_read_indicator?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'app/serializers/web_hook_topic_view_serializer.rb', line 28

def include_show_read_indicator?
  false
end

#last_posterObject



36
37
38
# File 'app/serializers/web_hook_topic_view_serializer.rb', line 36

def last_poster
  BasicUserSerializer.new(object.topic.last_poster, scope: scope, root: false)
end