我有一个如下所示的jbuilder模板:
json.flights @campaign.flights do |flight|
json.partial! 'flights/show', collection: @campaign.flights, as: :flight
json.has_delivered flight.has_delivered?
end
在尝试渲染has_delivered时渲染部分后抛出错误。
"can't convert String into Integer"
有谁知道如何渲染这个?