Serializers now inherit attributes

This commit is contained in:
Yohan Robert
2015-04-08 16:51:28 +02:00
committed by groyoh
parent 1577969cb7
commit 02ffff599f
4 changed files with 57 additions and 4 deletions

View File

@@ -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