mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 23:13:53 +08:00
012aaf0ba3
The value field of ThemeField is only used when viewing a diff in the staff action logs and local theme editing. value is being serialized into the theme index as well, which is not used. It's a huge amount of JSON that we can cut by removing it. This also breaks up the various theme serializers into separate classes so they autoload properly (or at least restart the server on edit)
14 lines
264 B
Ruby
14 lines
264 B
Ruby
# frozen_string_literal: true
|
|
|
|
class BasicThemeSerializer < ApplicationSerializer
|
|
attributes :id, :name, :created_at, :updated_at, :default, :component
|
|
|
|
def include_default?
|
|
object.id == SiteSetting.default_theme_id
|
|
end
|
|
|
|
def default
|
|
true
|
|
end
|
|
end
|