Include Serializer._type in collection serializer json_key cascade

This commit is contained in:
Benjamin Fleischer
2016-03-24 23:56:53 -05:00
parent 2dd0c33461
commit a74d174420
5 changed files with 31 additions and 31 deletions

View File

@@ -182,7 +182,7 @@ module ActiveModel
# Used by adapter as resource root.
def json_key
root || object.class.model_name.to_s.underscore
root || _type || object.class.model_name.to_s.underscore
end
def read_attribute_for_serialization(attr)