lib/gorillib/collection/model_collection.rb in gorillib-0.5.0 vs lib/gorillib/collection/model_collection.rb in gorillib-0.5.2

- old
+ new

@@ -38,9 +38,10 @@ if label && include?(label) item = fetch(label) item.receive!(attrs, &block) item else + attrs = attrs.attributes if attrs.is_a? Gorillib::Model attrs = attrs.merge(key_method => label) if key_method && label receive_item(label, attrs, &block) end rescue StandardError => err ; err.polish("#{item_type} #{label} as #{attrs} to #{self}") rescue nil ; raise end