pluralising root key when using arraySerializer

This commit is contained in:
João Moura
2015-06-15 15:59:01 -03:00
parent 329691276a
commit 65e0d79195
4 changed files with 8 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ module ActiveModel
def fields_for(serializer)
key = serializer.json_key
fields[key.to_sym]
fields[key.to_sym] || fields[key.pluralize.to_sym]
end
private