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

- old
+ new

@@ -76,16 +76,10 @@ item_class.new(item, @configuration, localized?, includes, depth) end def fetch_includes - includes = json['items'].dup - %w(Entry Asset).each do |type| - if json.fetch('includes', {}).key?(type) - includes.concat(json['includes'].fetch(type, [])) - end - end - includes + Support.includes_from_response(json) end def resource_class(item) return fetch_custom_resource_class(item) if %w(Entry DeletedEntry Asset DeletedAsset).include?(item['sys']['type']) resource_mapping[item['sys']['type']]