mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs and reduces memory usage of the app. Test suite passes now, but there may be some stuff left, so we will run a few sites on a branch prior to merging
This commit is contained in:
committed by
Guo Xiang Tan
parent
4e1f25197d
commit
30990006a9
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AboutSerializer < ApplicationSerializer
|
||||
|
||||
class UserAboutSerializer < BasicUserSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminBadgeSerializer < BadgeSerializer
|
||||
attributes :query, :trigger, :target_posts, :auto_revoke, :show_posts
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminBadgesSerializer < ApplicationSerializer
|
||||
attributes :protected_system_fields, :triggers
|
||||
has_many :badges, serializer: AdminBadgeSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminDetailedUserSerializer < AdminUserSerializer
|
||||
|
||||
attributes :moderator,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminEmailTemplateSerializer < ApplicationSerializer
|
||||
attributes :id, :title, :subject, :body, :can_revert?
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminPluginSerializer < ApplicationSerializer
|
||||
attributes :id,
|
||||
:name,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'post_item_excerpt'
|
||||
|
||||
class AdminUserActionSerializer < ApplicationSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminUserListSerializer < BasicUserSerializer
|
||||
|
||||
attributes :email,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'admin_user_list_serializer'
|
||||
|
||||
class AdminUserSerializer < AdminUserListSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminWebHookEventSerializer < ApplicationSerializer
|
||||
attributes :id,
|
||||
:web_hook_id,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminWebHookSerializer < ApplicationSerializer
|
||||
attributes :id,
|
||||
:payload_url,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ApiKeySerializer < ApplicationSerializer
|
||||
|
||||
attributes :id,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'distributed_cache'
|
||||
|
||||
class ApplicationSerializer < ActiveModel::Serializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ArchetypeSerializer < ApplicationSerializer
|
||||
|
||||
attributes :id, :name, :options
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AuthProviderSerializer < ApplicationSerializer
|
||||
|
||||
attributes :name, :custom_url, :pretty_name_override, :title_override, :message_override,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BackupFileSerializer < ApplicationSerializer
|
||||
attributes :filename,
|
||||
:size,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BadgeGroupingSerializer < ApplicationSerializer
|
||||
attributes :id, :name, :description, :position, :system
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BadgeIndexSerializer < BadgeSerializer
|
||||
attributes :has_badge
|
||||
has_one :badge_grouping
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BadgeSerializer < ApplicationSerializer
|
||||
attributes :id, :name, :description, :grant_count, :allow_title,
|
||||
:multiple_grant, :icon, :image, :listable, :enabled, :badge_grouping_id,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BadgeTypeSerializer < ApplicationSerializer
|
||||
attributes :id, :name, :sort_order
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BasicCategorySerializer < ApplicationSerializer
|
||||
|
||||
attributes :id,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BasicGroupHistorySerializer < ApplicationSerializer
|
||||
attributes :action,
|
||||
:subject,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BasicGroupSerializer < ApplicationSerializer
|
||||
attributes :id,
|
||||
:automatic,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BasicGroupUserSerializer < ApplicationSerializer
|
||||
attributes :group_id, :user_id, :notification_level, :owner
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# The most basic attributes of a topic that we need to create a link for it.
|
||||
class BasicPostSerializer < ApplicationSerializer
|
||||
attributes :id,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# The most basic attributes of a topic that we need to create a link for it.
|
||||
class BasicTopicSerializer < ApplicationSerializer
|
||||
attributes :id, :title, :fancy_title, :slug, :posts_count
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BasicUserBadgeSerializer < ApplicationSerializer
|
||||
attributes :id, :granted_at, :count, :grouping_position
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class BasicUserSerializer < ApplicationSerializer
|
||||
attributes :id, :username, :name, :avatar_template
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CategoryAndTopicListsSerializer < ApplicationSerializer
|
||||
has_one :category_list, serializer: CategoryListSerializer, embed: :objects
|
||||
has_one :topic_list, serializer: TopicListSerializer, embed: :objects
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CategoryDetailedSerializer < BasicCategorySerializer
|
||||
|
||||
attributes :topic_count,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CategoryListSerializer < ApplicationSerializer
|
||||
|
||||
attributes :can_create_category,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CategorySerializer < BasicCategorySerializer
|
||||
|
||||
attributes :read_restricted,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CategoryUploadSerializer < ApplicationSerializer
|
||||
attributes :id, :url, :width, :height
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ColorSchemeColorSerializer < ApplicationSerializer
|
||||
attributes :name, :hex, :default_hex
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ColorSchemeSerializer < ApplicationSerializer
|
||||
attributes :id, :name, :is_base, :base_scheme_id, :theme_id, :theme_name
|
||||
has_many :colors, serializer: ColorSchemeColorSerializer, embed: :objects
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module EmailLogsMixin
|
||||
def self.included(klass)
|
||||
klass.attributes :id,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module TopicTagsMixin
|
||||
def self.included(klass)
|
||||
klass.attributes :tags
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'browser_detection'
|
||||
require_dependency 'discourse_ip_info'
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module UserPrimaryGroupMixin
|
||||
|
||||
def self.included(klass)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'new_post_manager'
|
||||
|
||||
class CurrentUserSerializer < BasicUserSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DetailedUserBadgeSerializer < BasicUserBadgeSerializer
|
||||
has_one :granted_by, serializer: UserBadgeSerializer::UserSerializer
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DirectoryItemSerializer < ApplicationSerializer
|
||||
|
||||
class UserSerializer < UserNameSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DirectorySerializer < ApplicationSerializer
|
||||
attributes :id
|
||||
has_many :directory_items, serializer: DirectoryItemSerializer, embed: :objects
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DiscourseVersionCheckSerializer < ApplicationSerializer
|
||||
attributes :latest_version,
|
||||
:critical_updates,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'post_item_excerpt'
|
||||
|
||||
class DraftSerializer < ApplicationSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class EmailLogSerializer < ApplicationSerializer
|
||||
include EmailLogsMixin
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class EmbeddableHostSerializer < ApplicationSerializer
|
||||
|
||||
TO_SERIALIZE = [:id, :host, :path_whitelist, :class_name, :category_id]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class EmbeddingSerializer < ApplicationSerializer
|
||||
attributes :id, :fields, :base_url
|
||||
attributes *Embedding.settings
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class EmojiSerializer < ApplicationSerializer
|
||||
attributes :name, :url
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class FlaggedTopicSerializer < ActiveModel::Serializer
|
||||
attributes :id,
|
||||
:title,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class FlaggedTopicSummarySerializer < ActiveModel::Serializer
|
||||
|
||||
attributes(
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class FlaggedUserSerializer < BasicUserSerializer
|
||||
attributes :can_delete_all_posts,
|
||||
:can_be_deleted,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class GapSerializer < ApplicationSerializer
|
||||
attributes :before, :after
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'post_item_excerpt'
|
||||
|
||||
class GroupPostSerializer < ApplicationSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class GroupPostUserSerializer < BasicUserSerializer
|
||||
attributes :title, :name
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class GroupRequesterSerializer < BasicUserSerializer
|
||||
attributes :reason, :requested_at
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class GroupShowSerializer < BasicGroupSerializer
|
||||
attributes :is_group_user, :is_group_owner, :is_group_owner_display, :mentionable, :messageable
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class GroupUserSerializer < BasicUserSerializer
|
||||
include UserPrimaryGroupMixin
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class GroupedScreenedUrlSerializer < ApplicationSerializer
|
||||
attributes :domain,
|
||||
:action,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class GroupedSearchResultSerializer < ApplicationSerializer
|
||||
has_many :posts, serializer: SearchPostSerializer
|
||||
has_many :users, serializer: SearchResultUserSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class HiddenProfileSerializer < BasicUserSerializer
|
||||
attributes(
|
||||
:profile_hidden?,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class IncomingEmailDetailsSerializer < ApplicationSerializer
|
||||
|
||||
attributes :error,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class IncomingEmailSerializer < ApplicationSerializer
|
||||
|
||||
attributes :id,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class InviteSerializer < ApplicationSerializer
|
||||
|
||||
attributes :email, :created_at, :redeemed_at, :expired, :user
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class InvitedUserSerializer < BasicUserSerializer
|
||||
|
||||
attributes :topics_entered,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'pinned_check'
|
||||
|
||||
class ListableTopicSerializer < BasicTopicSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'application_serializer'
|
||||
|
||||
class NewPostResultSerializer < ApplicationSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class NotificationSerializer < ApplicationSerializer
|
||||
|
||||
attributes :id,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PenaltyCountsSerializer < ApplicationSerializer
|
||||
attributes :silenced, :suspended, :total
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PermalinkSerializer < ApplicationSerializer
|
||||
attributes :id, :url, :topic_id, :topic_title, :topic_url,
|
||||
:post_id, :post_url, :post_number, :post_topic_title,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'configurable_urls'
|
||||
|
||||
class PostActionTypeSerializer < ApplicationSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostActionUserSerializer < BasicUserSerializer
|
||||
attributes :post_url,
|
||||
:username_lower
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module PostItemExcerpt
|
||||
|
||||
def self.included(base)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostRevisionSerializer < ApplicationSerializer
|
||||
|
||||
attributes :created_at,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PostSerializer < BasicPostSerializer
|
||||
|
||||
# To pass in additional information we might need
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'gap_serializer'
|
||||
require_dependency 'post_serializer'
|
||||
require_dependency 'timeline_lookup'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# The most basic attributes of a topic that we need to create a link for it.
|
||||
class PostWordpressSerializer < BasicPostSerializer
|
||||
attributes :post_number
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class PrimaryGroupSerializer < ApplicationSerializer
|
||||
attributes :id, :name, :flair_url, :flair_bg_color, :flair_color
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Deprecated, should be removed once users have sufficient opportunity to do so
|
||||
class QueuedPostSerializer < ApplicationSerializer
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableActionSerializer < ApplicationSerializer
|
||||
attributes :id, :icon, :label, :confirm_message, :description, :client_action
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableBundledActionSerializer < ApplicationSerializer
|
||||
attributes :id, :icon, :label
|
||||
has_many :actions, serializer: ReviewableActionSerializer, root: 'actions'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableConversationPostSerializer < ApplicationSerializer
|
||||
attributes :id, :excerpt
|
||||
has_one :user, serializer: BasicUserSerializer, root: 'users'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableConversationSerializer < ApplicationSerializer
|
||||
attributes :id, :permalink, :has_more
|
||||
has_many :conversation_posts, serializer: ReviewableConversationPostSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableEditableFieldSerializer < ApplicationSerializer
|
||||
attributes :id, :type
|
||||
end
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableFlaggedPostSerializer < ReviewableSerializer
|
||||
target_attributes :cooked, :raw, :reply_count
|
||||
attributes :blank_post, :post_updated_at, :post_version
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableHistorySerializer < ApplicationSerializer
|
||||
|
||||
attributes :id, :reviewable_history_type, :status, :created_at
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewablePerformResultSerializer < ApplicationSerializer
|
||||
|
||||
attributes(
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableQueuedPostSerializer < ReviewableSerializer
|
||||
|
||||
payload_attributes(
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableScoreBonusSerializer < ApplicationSerializer
|
||||
attributes :id, :name, :score_bonus
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'reviewable_score_type_serializer'
|
||||
|
||||
class ReviewableScoreSerializer < ApplicationSerializer
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableScoreTypeSerializer < ApplicationSerializer
|
||||
attributes :id, :title, :score_bonus, :icon
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_dependency 'reviewable_action_serializer'
|
||||
require_dependency 'reviewable_editable_field_serializer'
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableSettingsSerializer < ApplicationSerializer
|
||||
attributes :id
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableTopicSerializer < ApplicationSerializer
|
||||
attributes(
|
||||
:id,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ReviewableUserSerializer < ReviewableSerializer
|
||||
|
||||
attributes :link_admin, :user_fields
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ScreenedEmailSerializer < ApplicationSerializer
|
||||
attributes :email,
|
||||
:action,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ScreenedIpAddressSerializer < ApplicationSerializer
|
||||
attributes :id,
|
||||
:ip_address,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ScreenedUrlSerializer < ApplicationSerializer
|
||||
attributes :url,
|
||||
:domain,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SearchLogsSerializer < ApplicationSerializer
|
||||
attributes :term,
|
||||
:searches,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SearchPostSerializer < BasicPostSerializer
|
||||
has_one :topic, serializer: SearchTopicListItemSerializer
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user