I have the following RABL template file
node(:status) { response.status }
node(:errors) { @errors.inspect }
collection :@substances
attributes :name
Now my controller action isn't actually invoked, because an authentication filter is running before hand and setting the return status to 401. So @substances is nil. RABL then fails with a
undefined method `name' for nil:NilClass
error. How can I get RABL to not start iterating over the collection when it's nil?