3
我是Ruby/Ruby on Rails的新手。我写了下面的代码从api获取布尔值。 API调用失败,并且它去救援块。但由于某种原因,它将该值设置为true。我不明白这是怎么发生的。Ruby变量值设置为true
@is_attached = OnDeck.api.check_is_attached(@decision.application_number, current_user)
API调用/客户包装代码
def check_is_attached(app_number, user)
begin
client.check_is_attached(app_number, user.auth_token)
rescue OnDeckException::MerchantApiException => e
Rails.logger.error("Caught exception #{e} while calling check_mbs_attached for app_number : #{app_number}")
end
end
正确的,你仍然可以返回不管你从急救块的愿望。 – whodini9
哦,谢谢!应该想到这一点。 – NewQueries