lib/contentful/resource_builder.rb in contentful-2.1.0 vs lib/contentful/resource_builder.rb in contentful-2.1.1

- old
+ new

@@ -86,11 +86,11 @@ end includes end def resource_class(item) - return fetch_custom_resource_class(item) if %w(Entry Asset).include?(item['sys']['type']) + return fetch_custom_resource_class(item) if %w(Entry DeletedEntry Asset DeletedAsset).include?(item['sys']['type']) resource_mapping[item['sys']['type']] end def fetch_custom_resource_class(item) case item['sys']['type'] @@ -99,9 +99,13 @@ return resource_class unless resource_class.nil? return fetch_custom_resource_mapping(item, 'Entry', Entry) when 'Asset' return fetch_custom_resource_mapping(item, 'Asset', Asset) + when 'DeletedEntry' + return fetch_custom_resource_mapping(item, 'DeletedEntry', DeletedEntry) + when 'DeletedAsset' + return fetch_custom_resource_mapping(item, 'DeletedAsset', DeletedAsset) end end def fetch_custom_resource_mapping(item, type, default_class) resources = resource_mapping[type]