In the grape object, I want to show the field only if it is present (not zero?) Without any luck.
I try to use this code, but it does not work properly, but I always hide the field.
expose :winner, :using => PlayerEntity, :unless => { :winner => nil }
I think the code itself explains what I really need, but, as I said, I am not getting the expected result.
Any clue?
source
share