mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: Allow user serializer to make use of preloaded custom fields (#9074)
This commit is contained in:
@@ -142,6 +142,10 @@ module HasCustomFields
|
||||
super
|
||||
end
|
||||
|
||||
def custom_fields_preloaded?
|
||||
!!@preloaded_custom_fields
|
||||
end
|
||||
|
||||
def custom_field_preloaded?(name)
|
||||
@preloaded_custom_fields && @preloaded_custom_fields.key?(name)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user