mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Add ActiveSupport::DescendantsTracker to Serializer and ArraySerializer
This commit is contained in:
parent
0114e49238
commit
fa51c5f574
@ -1,4 +1,6 @@
|
||||
require "active_support/core_ext/class/attribute"
|
||||
require 'active_support/dependencies'
|
||||
require 'active_support/descendants_tracker'
|
||||
|
||||
module ActiveModel
|
||||
# Active Model Array Serializer
|
||||
@ -11,6 +13,8 @@ module ActiveModel
|
||||
# ActiveModel::ArraySerializer.root = false
|
||||
#
|
||||
class ArraySerializer
|
||||
extend ActiveSupport::DescendantsTracker
|
||||
|
||||
attr_reader :object, :options
|
||||
|
||||
class_attribute :root
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
require "active_support/core_ext/class/attribute"
|
||||
require "active_support/core_ext/module/anonymous"
|
||||
require 'active_support/dependencies'
|
||||
require 'active_support/descendants_tracker'
|
||||
|
||||
module ActiveModel
|
||||
# Active Model Serializer
|
||||
@ -36,6 +38,8 @@ module ActiveModel
|
||||
# end
|
||||
#
|
||||
class Serializer
|
||||
extend ActiveSupport::DescendantsTracker
|
||||
|
||||
INCLUDE_METHODS = {}
|
||||
INSTRUMENT = { :serialize => :"serialize.serializer", :associations => :"associations.serializer" }
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user