【发布时间】:2013-04-24 14:37:03
【问题描述】:
由于 Sintra 是一个 Rack 应用,我认为它可以使用 Rack 方式:
get '/' do
result = true
if result
['200', {'Content-Type' => 'application/json'}, [{result:true}.to_ json]]
else
binding.pry
['500', {'Content-Type' => 'application/json'}, [{result:false}.to _json]]
end
end
不行,总是返回500页面,不管变量是true还是false
【问题讨论】: