lib/runcible/extensions/consumer.rb in runcible-1.0.5 vs lib/runcible/extensions/consumer.rb in runcible-1.0.6

- old
+ new

@@ -135,10 +135,16 @@ content = [{:unit_key=> nil, :type_id=>type_id}] else units.each do |unit| content_unit = {} content_unit[:type_id] = type_id - content_unit[:unit_key] = { unit_key => unit } + if unit.is_a?(Hash) + #allow user to pass in entire unit + content_unit[:unit_key] = unit + else + content_unit[:unit_key] = { unit_key => unit } + end + content.push(content_unit) end end content end