empty return if builder contains an array with an empty set #7

Closed
mtkd opened this Issue Aug 31, 2011 · 1 comment

Comments

Projects
None yet
2 participants

mtkd commented Aug 31, 2011

Jsonify::Builder.plain do |json|
  json.bar do
    json.id bar.id
  end

  json.foos(foos) do |foo|
    {id: foo._id}
  end
end

If foos is empty the return from builder is empty - so no bar.

Owner

bsiggelkow commented Sep 1, 2011

Fixed with release 0.1.3 -- Thanks for the feedback! That was a bit of a tricky one to solve.

@bsiggelkow bsiggelkow closed this Sep 1, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment