November 21, 2020
How to have a fallback value when object is nil on an empty array in Jbuilder.
@examples = [] json.example([]) json.example(@examples) do |example| json.id example.id end