grape-entity
grape-entity copied to clipboard
Safe behavior (question)
Hi folks. Given the following entity:
expose :name
expose :address
expose :street, safe: true do |instance, _|
instance.address.street
end
end
If address is nil, safe: true is supposed to make street return nil instead of an exception? It's returning undefined method street for nil:NilClass.