diff --git a/lib/jbuilder.rb b/lib/jbuilder.rb index 1290839..d6e3867 100644 --- a/lib/jbuilder.rb +++ b/lib/jbuilder.rb @@ -344,9 +344,11 @@ def _set_value(key, value) end def _map_collection(collection) - collection.map do |element| + collection = collection.map do |element| _scope{ yield element } - end - [BLANK] + end + collection.delete(BLANK) + collection end def _scope