mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Serializers now inherit attributes
This commit is contained in:
@@ -22,9 +22,9 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def self.inherited(base)
|
||||
base._attributes = []
|
||||
base._attributes_keys = {}
|
||||
base._associations = {}
|
||||
base._attributes = self._attributes.try(:dup) || []
|
||||
base._attributes_keys = self._attributes_keys.try(:dup) || {}
|
||||
base._associations = self._associations.try(:dup) || {}
|
||||
base._urls = []
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user